@signumjs/http
Version:
SignumJS Generic Http Module
25 lines • 915 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.HttpClientFactory = void 0;
const httpAdapterAxios_1 = require("./httpAdapterAxios");
/**
* Factory for clients of {@link Http}
*
* @module http
*/
class HttpClientFactory {
/**
* Creates an Http instance
*
* The current default implementation uses https://github.com/axios/axios
*
* @param baseUrl The base/root host url for the adapter, i.e. https://contoso.com
* @param options An arbitrary options object, depending on the implementation.
* As the default implementation uses axios the available options are here: https://axios-http.com/docs/req_config
*/
static createHttpClient(baseUrl, options) {
return new httpAdapterAxios_1.HttpAdapterAxios(baseUrl, options);
}
}
exports.HttpClientFactory = HttpClientFactory;
//# sourceMappingURL=httpClientFactory.js.map