A wapper of httpsession.


(inner) request(url, optionsopt, callbackopt)

Send a http request.

Name Type Attributes Description
url string
options object <optional>
Name Type Attributes Description
method string <optional>

the http method, like `GET', 'POST', 'PUT'.

body string <optional>

the http body to send.

timeout number <optional>

the timeout in seconds.

headers object <optional>

the http headers.

callback function <optional>

the callback when request is done.

(inner) abort()

Aborting all requests in current process, it closes uv_async_t handles in this library, none of callbacks will be invoked after this.