UNPKG

semantic-network

Version:

A utility library for manipulating a list of links that form a semantic interface to a network of resources.

20 lines 816 B
import { HttpRequest } from './httpRequest'; import { defaultRequestOptions } from './defaultRequestOptions'; export class HttpRequestFactory { /** * Factory up a version of the http request. * * If requiring a specific version, call this method to instantiate the specific singleton * @param options * @param forceNewOptions * @constructor */ static Instance(options, forceNewOptions) { var _a; if (forceNewOptions && options) { this.instance = new HttpRequest(Object.assign(Object.assign({}, defaultRequestOptions), options)); } return (_a = this.instance) !== null && _a !== void 0 ? _a : new HttpRequest(Object.assign(Object.assign({}, defaultRequestOptions), options)); } } //# sourceMappingURL=httpRequestFactory.js.map