SYNAPSE - Synchronous TCP/IP Library for Delphi
Other related information can be found at http://www.ararat.cz/synapse/
Class: THTTPSend
- Properties:
- Timeout:integer
Define timeout in milliseconds for all HTTP operations. Default value is 300 seconds.
- SMTPhost:String
Address of HTTP server (IP address or domain name) where you want to connect.
- HTTPPort:string
Port number for HTTP connection. Default value is 80.
- ProxyHost:String
Address of proxy server (IP address or domain name) where you want to connect in DoMethod method.
- ProxyPort:string
Port number for proxy connection. Default value is 8080.
- ProxyUser:String
Username for connect to proxy server where you want to connect in DoMethod method.
- ProxyPass:String
Password for connect to proxy server where you want to connect in DoMethod method.
- ResultCode:integer
After successful DoMethod method contains result code of operation.
- Methods:
- Function Request(Query,Response:TStrings):Boolean
Connects to a HTTPHost and HTTPPort and send there Query. After it receive Response and close connection. If all OK, result is true, else result is false.
- Function DoMethod(method,URL:string;Content,Response:TStrings):boolean
Connects to host define in URL and access to resource defined in URL by method. If method sends data to server, this data is in Content, alese this may be as nil. Server response is in response. Connection may be authorised byt username and password in URL. If you define proxy properties, connection is made by this proxy. If all OK, result is true, else result is false.
- Not class (but cohere) functions:
- Function SimpleGet(URL:string;Response:TStrings):boolean
This is useful function and example of use THTTPSend object. It implement simple GET method of HTTP 0.9 protocol. This function send GET metod for URL document at HTTP server. Returned document is in Response stringlist (Simple GET is without any headers). If all OK, result is true, else result is false.
- Function Get(URL:string;Response:TStrings):boolean
This is useful function and example of use THTTPSend object. It implement GET method of HTTP protocol. This function send GET metod for URL document at HTTP server. Returned document is in Response stringlist. If all OK, result is true, else result is false.
- Function Post(URL:string;Value,Response:TStrings):Boolean
This is useful function and example of use THTTPSend object. It implement SEND method of HTTP protocol. This function send SEND metod for URL document at HTTP server. Sending document is in Value. Returned document is in Response stringlist. If all OK, result is true, else result is false.