@yoda/httpsession

A wapper of httpsession.

Methods

(inner) request(url, optionsopt, callbackopt)

Send a http request.

Parameters:
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.