ARSubmitPost
From Blue Mars Developer Guidebook
There are security restrictions on this article
|
|
This is an Avatar Reality Utilities function.
Contents |
Function
- ARSubmitPost(url, destfile, parameters, options)
- send an HTTP POST request
- url - string web URL of the request
- destfile - string file in which to save results of the HTTP request
- parameters - table table of key-value parameters to include with the request
- options - table table of additional options accepted by ARDownloadFile
Code
This convenience function for HTTP GET requests allows you to supply the request parameters as a table of key-value pairs. It calls ARDownloadParamString to urlencode and concatenate the parameters and then includes them in the post parameter of the options table passed to ARDownloadFile (which in turn includes them in the body of the HTTP request)
function ARSubmitPost(url, dest, params, options)
if not options then
options = {};
end
options.post=ARDownloadParamString(params);
ARDownloadFile(url,dest,options);
end
Examples
Notes
- See also ARSubmitGet and the Web functions.

