Re: HTTP multipart downloads

forums_at_mail.bg
Date: 01/22/05

  • Next message: Eddy: "Re: Newbie: What is the difference between a 'Form' & a 'Frame' ?"
    Date: 22 Jan 2005 01:37:08 -0800
    
    

    Maarten Wiltink wrote:
    > How are you making HTTP connections now? If you have a HTTP client
    > component with source and want to modify it to download ranges,
    > I think it's as simple as adding a header to the request that
    > specifies which bytes you want sent to you. That requires no more
    > than two properties (start and length, or begin and end) and most
    > likely a one-line modification to the request construction code.
    >
    > That doesn't in itself make several connections at once, but it's
    > a start. You could build a component around it that does.
    >
    > Groetjes,
    > Maarten Wiltink

    you are right, I found props ContentRangeStart/End in TidHTTP...
    but.... I have another problem. I could not find any demo about simple
    downloading with idHTTP. I am trying this code
    S := TFileStream.Create('.\tmp\tmp.rar', fmCreate );
    try
    H1.Get(URL, S);
    finally
    S.Free;
    end;

    ...dont know is it right way to do this. I expected to get whole file,
    but result was only portion of the file - with size of buffer. How to
    get whole file?


  • Next message: Eddy: "Re: Newbie: What is the difference between a 'Form' & a 'Frame' ?"