HTTP(s) transport based on XMLHttpRequest To use in nodeJS XMLHttpRequest should be defined in global like
global.XMLHttpRequest = require('xhr2')
Types
# XHRResponse inner
Result of xhr / get / post HTTP request
Properties
data
: string | Object | ArrayBufferresponse body:
- if
Content-Type
of the response isapplication/json
- an Object contains response body parsed usingJSON.parse
- if request is called with
{responseType: 'arraybuffer'}
option - response body as ArrayBuffer - string in other case
- if
status
: numberresponse HTTP status code
headers
: functionheader getter function
config
: Objectconfiguration object that was used for request