ifHTTP.Post Indy Delphi 7 vs. Indy 9.0.14

Giganews Newsgroups
Subject: ifHTTP.Post Indy Delphi 7 vs. Indy 9.0.14
Posted by:  Hillar Vetik (hill…@medisoft.ee)
Date: Tue, 11 Nov 2003

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