Re: ifHTTP.Post Indy Delphi 7 vs. Indy 9.0.14

Giganews Newsgroups
Subject: Re: ifHTTP.Post Indy Delphi 7 vs. Indy 9.0.14
Posted by:  Andrew Fiddian-Green (andrewfg at zugernet dot ch)
Date: Tue, 11 Nov 2003

Why are you calling the HEAD method before calling the POST method?

AndrewFG

"Hillar Vetik" <hill…@medisoft.ee> wrote in message
news:o3e1rv0mficra72vqp8383j5479c33ig…@4ax.com...
> Hi,
> in  Indy library witch come with Delphi 7 next code work
> & message(cLine)  is Post'ed to server
> {}
> procedure TForm1.Memo2Url(cLine : string);
> var
>  aStream : TIdMultiPartFormDataStream;
>  StrStream2 : TStringStream;
>  cResult, cResponse  : string;
> begin
>  StrStream2 := TStringStream.Create('');
>  IdHttp1.Request.ContentLength := length(cLine);
>  IdHttp1.Request.ContentType  := 'text/html';
>  IdHttp1.Request.Host                := EdHost.Text;
>  IdHttp1.Head(EdUrl.Text);
>  aStream := TIdMultiPartFormDataStream.Create;
>  aStream.AddFormField('password',EdPswd.Text);
>  aStream.AddFormField('message't,cLine);
>  IdHttp1.Post(EdUrl.Text,aStream, StrStream2);
>  cResult := IdHttp1.ResponseText;
>  cResponse := StrStream2.DataString;
>  StrStream2.Free;
>  aStream.free;
> end;
> {}
>
> but if i rebuild my project with Indy 9.0.14 server
> can't find  message text
>
> what is wrong
>
> Hillar

Replies

In response to

ifHTTP.Post Indy Delphi 7 vs. Indy 9.0.14 posted by Hillar Vetik on Tue, 11 Nov 2003