Method for executing an HTTP request. If data type is not specified, p5 will try to guess based on the URL, defaulting to text.
For more advanced use, you may also pass in the path as the first argument and a object as the second argument, the signature follows the one specified in the Fetch API specification. This method is suitable for fetching files up to size of 64MB when "GET" is used.
Examples
Syntax
httpDo(path, [method], [datatype], [data], [callback], [errorCallback])
httpDo(path, options, [callback], [errorCallback])
Parameters
name of the file or url to load
either "GET", "POST", or "PUT", defaults to "GET"
"json", "jsonp", "xml", or "text"
param data passed sent with request
function to be executed after httpGet() completes, data is passed in as first argument
function to be executed if there is an error, response is passed in as first argument
Request object options as documented in the "fetch" API reference