ARSubmitGet

From Blue Mars Developer Guidebook

Jump to: navigation, search
There are security restrictions on this article

This is an Avatar Reality Utilities function.

Contents

Function

ARSubmitGet(url, destfile, parameters, options)
send an HTTP GET 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

Notes

destfile is in the Blue Mars user directory, i.e. it is passed to ARUserPath

For POST requests, use ARSubmitPost

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 appends them to the URL before sending the request via ARDownloadFile.

function ARSubmitGet(url, dest, params, options)
   if not options then
      options = {};
   end
   params = ARDownloadParamString(params);
   ARDownloadFile(url.."?"..params,dest,options);
end

Examples

Notes

Problems with this wiki page? Contact us either by: Support Email or Support Ticket System

Blue Mars Guidebook Privacy Policy
Blue Mars Guidebook Community Guidelines

Personal tools