Method for executing an HTTP POST request. If data type is not specified, p5 will try to guess based on the URL, defaulting to text. This is equivalent to calling httpDo(path, 'POST')
.
Examples
Syntax
httpPost(path, [datatype], [data], [callback], [errorCallback])
httpPost(path, data, [callback], [errorCallback])
httpPost(path, callback, [errorCallback])
Parameters
path
String:
name of the file or url to load
datatype
String:
"json", "jsonp", "xml", or "text". If omitted, httpPost() will guess.
data
Object|Boolean:
param data passed sent with request
callback
Function:
function to be executed after httpPost() completes, data is passed in as first argument
errorCallback
Function:
function to be executed if there is an error, response is passed in as first argument
Notice any errors or typos? Please let us know. Please feel free to edit src/io/files.js and open a pull request!