UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

57 lines 2.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HttpSettings = void 0; const index_1 = require("./../index"); class HttpSettings { constructor(data) { let followRedirectDefault = true; this.followRedirect = typeof (data === null || data === void 0 ? void 0 : data.followRedirect) !== "undefined" ? data === null || data === void 0 ? void 0 : data.followRedirect : followRedirectDefault; this.headers = index_1.HttpSettingsHeader.fromJson(data === null || data === void 0 ? void 0 : data.headers); this.ssl = index_1.HttpSettingsSSL.fromJson(data === null || data === void 0 ? void 0 : data.ssl); this.timeout = index_1.HttpSettingsTimeout.fromJson(data === null || data === void 0 ? void 0 : data.timeout); let userAgentDefault = ""; this.userAgent = typeof (data === null || data === void 0 ? void 0 : data.userAgent) !== "undefined" ? data === null || data === void 0 ? void 0 : data.userAgent : userAgentDefault; } static getFollowRedirectDefault() { return true; } static getFollowRedirectDescription() { return ""; } static getHeadersDescription() { return ""; } static getSslDescription() { return ""; } static getTimeoutDescription() { return ""; } static getUserAgentDefault() { return ""; } static getUserAgentDescription() { return ""; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new HttpSettings(data); } toJson() { var _a, _b, _c; return { 'followRedirect': this.followRedirect, 'headers': (_a = this.headers) === null || _a === void 0 ? void 0 : _a.toJson(), 'ssl': (_b = this.ssl) === null || _b === void 0 ? void 0 : _b.toJson(), 'timeout': (_c = this.timeout) === null || _c === void 0 ? void 0 : _c.toJson(), 'userAgent': this.userAgent, }; } clone() { return HttpSettings.fromJson(this.toJson()); } } exports.HttpSettings = HttpSettings; //# sourceMappingURL=HttpSettings.js.map