cloudflare
Version:
The official TypeScript library for the Cloudflare API
38 lines • 1.89 kB
JavaScript
;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.OriginMaxHTTPVersion = void 0;
const resource_1 = require("cloudflare/resource");
class OriginMaxHTTPVersion extends resource_1.APIResource {
/**
* Origin Max HTTP Setting Version sets the highest HTTP version Cloudflare will
* attempt to use with your origin. This setting allows Cloudflare to make HTTP/2
* requests to your origin. (Refer to
* [Enable HTTP/2 to Origin](https://developers.cloudflare.com/cache/how-to/enable-http2-to-origin/),
* for more information.). The default value is "2" for all plan types except ENT
* where it is "1"
*/
edit(params, options) {
const { zone_id, ...body } = params;
return this._client.patch(`/zones/${zone_id}/settings/origin_max_http_version`, {
body,
...options,
})._thenUnwrap((obj) => obj.result);
}
/**
* Origin Max HTTP Setting Version sets the highest HTTP version Cloudflare will
* attempt to use with your origin. This setting allows Cloudflare to make HTTP/2
* requests to your origin. (Refer to
* [Enable HTTP/2 to Origin](https://developers.cloudflare.com/cache/how-to/enable-http2-to-origin/),
* for more information.). The default value is "2" for all plan types except ENT
* where it is "1"
*/
get(params, options) {
const { zone_id } = params;
return this._client.get(`/zones/${zone_id}/settings/origin_max_http_version`, options)._thenUnwrap((obj) => obj.result);
}
}
exports.OriginMaxHTTPVersion = OriginMaxHTTPVersion;
(function (OriginMaxHTTPVersion) {
})(OriginMaxHTTPVersion = exports.OriginMaxHTTPVersion || (exports.OriginMaxHTTPVersion = {}));
//# sourceMappingURL=origin-max-http-version.js.map