|Subject:||Re: HTTP Response ContentStream not delivering anything|
|Posted by:||Remy Lebeau \(Indy Team\) (email@example.com)|
|Date:||Mon, 10 Mar 2008|
"Richard A. DeVenezia" <rdevenez…@wildblue.net> wrote in message
> Afer posting I am trying to use
That is the wrong way to use TIdHTTP. If you want data to be loaded into a
TStream, you must pass your own TStream to Post()'s AResponseContent
parameter instead, ie:
Strm := TMemoryStream.Create;
HTTP.Post(URL, postdata, Strm);
// use Strm as needed...
Alternatively, use a String instead:
XML := HTTP.Post(URL, postdata);
// use XML as needed...
> but the .size is zero
Of course, because you did not pass your own TStream to Post() to begin
with. The Response.ContentStream property is for internal use only.
> I'm pretty sure the server is responding properly.
Perhaps, but you are not receiving the response correctly.
HTTP Response ContentStream not delivering anything posted by Richard A. DeVenezia on Sat, 8 Mar 2008