http POSTData property
Return to Introduction  Previous page  Next page
Applies to
auHTTP component.  

property POSTData: String;  

The POSTData property specifies any optional data to send with the HTTP request. The optional data can be the resource or information being posted to the server. The POSTData property is generally used to POST some data to the CGI programs.  

Example: (requesting data from the CGI script (at via POST method)
procedure TForm1.ReadBtnClick(Sender: TObject);  
  auHTTP1.URL := '';  
  auHTTP1.POSTData := 'String=HTTP&Exact=Yes&Title=No';  
procedure TForm1.auHTTP1Done(Sender: TObject; ContentType: string; FileSize: Integer; Stream: TStream);  
  // Receiving content from Stream  

iiinfo Remarks
1.When you trying to POST data to the CGI program specifying the POSTData property, make sure that RequestMethod has set to rmAutoDetect or rmPOST;  
2.The auHTTP component unable to post data to the CGI program when user working offline (even if user connected to the Internet). In this case, when you call the Read method, the OnHostUnreachable event occurs. Posting to the CGI programs requires active Internet connection.  

See also
RequestMethod property and Read method.