Internet Direct (Indy) Version 9.0.1 Beta
TIdHTTP.Post
Send HTTP data to a web server or CGI program.

function Post(AURL: string; const ASource: TStrings): String; overload;
function Post(AURL: string; const ASource: TStream): String; overload;
procedure Post(AURL: string; const ASource: TStrings; const AResponseContent: TStream); overload;
procedure Post(AURL: string; const ASource: TStream; const AResponseContent: TStream); overload;
Parameters
AURL: string
Location of the host or CGI application.

const ASource: TStream
Object containing the request data.

Returns
String - Values received in a Response for the HTTP POST method.

Description
Post is an overloaded method in TIdHTTP that is used to send data specified in ASource to the resource location in AURL. Post is overloaded to allow use of either TStrings or TStream object instances in ASource, and also provides procedure- and function-based variants of the method to allow String return values or storage of return values in AResponseContent.

Indy currently reverts the HTTP version to 1.0 in a call to the Post method. This occurs because some HTTP servers do not respect the RFC for HTTP 1.1 to the full extent of the specification. In particular, most servers do not send or expect to receive the 100-Continue HTTP header. Until an optimum solution that does NOT break the RFC is discovered, Indy will restrict all POST requests to version HTTP 1.0 compliance.

Post will replace all occurrences of the End-Of-Line (EOL) character in ASource with the value '&' prior to transger to the http server. </p>

post calls the dorequest method to perform the http transfer. </p>