- Introduction
- License
- History
- Compilation & Hosting
- Configuration File
- Modules:
- FAQ
- Links
- Credits
|
Declaration:
-
function http_request(cp: HTTPConnection; const method, uri: string): boolean;
Arguments:
-
cp |
Connection handle |
method |
HTTP method. GET, POST or HEAD. |
uri |
Complete request URI, e.g. '/news.htm', '/images/pic.gif', '/cgi-bin/script.cgi?foo=bar' |
Description:
-
This function sends HTTP request and dumps response headers. Connection to HTTP server should has been established with http_connect by this call. All request headers should have been modified with http_put_header or http_set_header and data for POST method should has been set with http_set_post before this call. Finally you can get response headers with http_get_header and document data with http_readc and http_reads after successful call of this function.
Returns:
-
TRUE on success, FALSE on error.
Usage:
-
http_request(cp, 'GET', '/index.html');
See also:
-
http_get_header, http_readc, http_reads.
|