Ok let me ask you this, how do I send a simple string to the HTTP server at port 1033 or whatever using your code?
Umm. Not quite the right question. You should be asking, how do I send a string using TIdHTTP
Its the same way a browser submit's a HTML FORM. You would have seen it millions of times in the address bar.
with TIdHTTP.Create(nil) do begin
try
Result := Get('http://127.0.0.1:1033/mydocument?str=HERE IS A STRING');
finally
Free;
end;
end;
You pick up the string at the server using:
ARequestInfo.Params.Values['str']
For larger messages, use TIdHTTP.Post. If you want more complex messages, POST XML.
PUT, is a little obsolete, since POST does everything PUT does. The difference is, POST is supported by HTML FORM's, while PUT isn't. So, PUT can be used as a private gateway for file transfers. (NOTE: Where do you think the name putlocker comes from?)
This is all basic HTTP stuff. HTTP is just a standard protocol which sits on top of TCP. Because its standard, every language supports it.
http://code.tutsplus.com/tutorials/http-the-protocol-every-web-developer-must-know-part-1--net-31177I guessing you haven't coded any PHP FORM stuff? Or, if you have you haven't connected the dots?