Hi,

I was recently looking at ICS and considering it as a replacement for Indy for 
an application which works as an interface for a web application. I wanted to 
give it a quick try and see how it handles performing a simple login so I put 
this together using the code from the OverbyteIcsHttpPost project:



var
  stl: AnsiString;
begin

  try
    stl := 'Action=User&ToDo=Login&Username=' + 
UrlEncodeToA(Trim(act.Username)) +
         '&Password=' + UrlEncodeToA(Trim(act.Password));
    http.SendStream := TMemoryStream.Create;
    http.SendStream.Write(stl[1], Length(stl));
    http.SendStream.Seek(0, 0);

    http.RcvdStream := TMemoryStream.Create;
    http.URL := Trim(act.Domain);
    http.ContentTypePost := 'application/x-www-form-urlencoded';


    http.PostASync;
  except

  end;


The code wasn't succeeding since the web side was routing it to the default 
controller so I attempted listing all post data received and found it wasn't 
receiving post data. I know it must be a problem with my code, something I must 
have missed as when I tested the same server with the same post output using 
your sample post application it works fine but for the life of me I don't see 
where the difference lies. I'm hoping someone may see something I'm missing.
 
Thanks,

Stewart
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to