RHTTP_POST Function
Sends an HTTP POST request. Returns an error string (empty if no error).
Syntax
RHTTP_POST(request, path, data)
Syntax Elements
request |
Either an initialised HTTP request (see RHTTP_INIT_REQUEST) or an empty string. |
path |
Path to data on a server (e.g. /index.html). |
data |
Any valid data for the path (delimited either by attribute mark or new line). |
If path is a full URL (that is, starting with http:// and including the host and, optionally, the port) then request can be an empty string ; in this case the request is initialised from the URL. Similarly, if request is an initialised HTTP request, the host (and port) from the URL override the values in the request header.
If path is a simple directory path, request must be an initialised request.
If the request has been used before, path may be relative to the last RHTTP_GET or RHTTP_POST (that is, it does not have to start with "/").
Return Value
Using RHTTP_POST on an active request returns an error.
Operation
RHTTP_POST allows data to be sent to a URL without including it in a query string.
The HTTP header field Content-Length
is automatically set to the correct length for the supplied data.