I've tried using both the THttpSend object and the HttpPostURL method and I 
seem 
to be having a problem.

I'm trying to connect to a local webserver with the following URL:

http://127.0.0.1/data.cgi
or
http://localhost/data.cgi

If I type in the address in FireFox, I can navigate to the cgi correctly. 
However, if I use the same URL (see below) with HTTPSend, the web server 
returns 
a 404 File not found.

Any help or suggestion would be appreciated.  Below is some code, though its 
not 
a clean as it was starting as I have tried changing several different things to 
get it to work.  I'm at a bit of a loss... :-)

procedure TForm1.btnExecuteClick(Sender: TObject);
var
   lSS: TStringStream;
   lRes: boolean;
   lURL: string;
   lURLData: string;
   lSize: integer;
begin
   lURLData := 'request=' + memSend.Lines.Text;
   lSS := TStringStream.Create('');
   try
     lRes := false;
     lRes := HttpPostURL('http://127.0.0.1/data.cgi', lURLData, lSS);
//    lRes := lSend.HTTPMethod('POST', lURLData);
     memRecv.Lines.Text := lSS.DataString;
   finally
     lSS.free;
   end;
end;


--
Warm Regards,

Lee

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to