cloudflare
Version:
The official TypeScript library for the Cloudflare API
34 lines • 1.71 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflare/resource';
export class OriginMaxHTTPVersionResource extends 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);
}
}
(function (OriginMaxHTTPVersionResource) {
})(OriginMaxHTTPVersionResource || (OriginMaxHTTPVersionResource = {}));
//# sourceMappingURL=origin-max-http-version.mjs.map