UNPKG

@fmal/http-service

Version:

A HTTP service - orignally @cerebral/http

51 lines (37 loc) 1.49 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); exports.__esModule = true; exports.FileUpload = exports.HttpServiceError = exports.HttpServiceErrorTypes = void 0; var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose")); var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper")); var HttpServiceErrorTypes; exports.HttpServiceErrorTypes = HttpServiceErrorTypes; (function (HttpServiceErrorTypes) { HttpServiceErrorTypes["Http"] = "http"; HttpServiceErrorTypes["Abort"] = "abort"; HttpServiceErrorTypes["Timeout"] = "timeout"; })(HttpServiceErrorTypes || (exports.HttpServiceErrorTypes = HttpServiceErrorTypes = {})); var HttpServiceError = /*#__PURE__*/ function (_Error) { (0, _inheritsLoose2.default)(HttpServiceError, _Error); function HttpServiceError() { var _this; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _Error.call.apply(_Error, [this].concat(args)) || this; _this.type = void 0; _this.response = void 0; return _this; } return HttpServiceError; }((0, _wrapNativeSuper2.default)(Error)); exports.HttpServiceError = HttpServiceError; var FileUpload = function FileUpload() { this.xhr = void 0; this.isAborted = void 0; this.send = void 0; this.abort = void 0; }; exports.FileUpload = FileUpload;