UNPKG

cerebral-http-bugfix-1210

Version:
20 lines (17 loc) 495 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = request; /* eslint-env browser */ function request(options, cb) { var xhr = new XMLHttpRequest(); xhr.addEventListener('progress', cb); xhr.addEventListener('load', cb); xhr.addEventListener('error', cb); xhr.addEventListener('abort', cb); xhr.open(options.method, options.baseUrl + options.url); options.onRequest(xhr, options); return xhr; } //# sourceMappingURL=request.js.map