Function that sends a HTTP request, returning promise.
Function that sends a HTTP request, returning a promise.
It uses XMLHTTPRequest, and will use the xmlhttprequest package in Node.js.
You may pass optional headers and data arguments. If only one extra parameter is given, it's assumed to be the headers object.
The response object has the following methods:
send-http-request is released under the MIT License.
Copyright (c) 2013 Meryn Stol