request.send(method[, data][, callback])
Issues this request using the specified method (such as GET
or POST
), optionally posting the specified data in the request body, and returns this request instance. If a callback is specified, the callback will be invoked asynchronously when the request succeeds or fails. The callback is invoked with two arguments: the error, if any, and the response value. The response value is undefined if an error occurs. This is equivalent to:
request .on("error", function(error) { callback(error); }) .on("load", function(xhr) { callback(null, xhr); }) .send(method, data);
If no callback is specified, then "load" and "error" listeners should be registered via request.on.
Please login to continue.