Delphi: problem with httpcli (ICS) post method

Posted by www.yegorov-p.ru on Stack Overflow See other posts from Stack Overflow or by www.yegorov-p.ru
Published on 2010-03-08T18:24:44Z Indexed on 2010/03/08 18:36 UTC
Read the original article Hit count: 641

Filed under:
|
|
|

Hello

I am using HttpCli component form ICS to POST a request. I use an example that comes with the component. It says:

procedure TForm4.Button2Click(Sender: TObject);
var
    Data : String;
begin
    Data:='status=no';
    HttpCli1.SendStream := TMemoryStream.Create;
    HttpCli1.SendStream.Write(Data[1], Length(Data));
    HttpCli1.SendStream.Seek(0, 0);
    HttpCli1.RcvdStream := TMemoryStream.Create;
    HttpCli1.URL := Trim('http://server/something');
    HttpCli1.PostAsync;
end;

But it fact, it sends not

status=no

but

s.t.a.t.u

I can't understand, where is the problem. Maybe someone can show an example, how to send POST request with the help of HttpCli component?

PS I can't use Indy =)

© Stack Overflow or respective owner

Related posts about delphi

Related posts about ics