cloudflare
Version:
The official TypeScript library for the Cloudflare API
31 lines • 1.43 kB
JavaScript
;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.EarlyHints = void 0;
const resource_1 = require("cloudflare/resource");
class EarlyHints extends resource_1.APIResource {
/**
* When enabled, Cloudflare will attempt to speed up overall page loads by serving
* `103` responses with `Link` headers from the final response. Refer to
* [Early Hints](https://developers.cloudflare.com/cache/about/early-hints) for
* more information.
*/
edit(params, options) {
const { zone_id, ...body } = params;
return this._client.patch(`/zones/${zone_id}/settings/early_hints`, { body, ...options })._thenUnwrap((obj) => obj.result);
}
/**
* When enabled, Cloudflare will attempt to speed up overall page loads by serving
* `103` responses with `Link` headers from the final response. Refer to
* [Early Hints](https://developers.cloudflare.com/cache/about/early-hints) for
* more information.
*/
get(params, options) {
const { zone_id } = params;
return this._client.get(`/zones/${zone_id}/settings/early_hints`, options)._thenUnwrap((obj) => obj.result);
}
}
exports.EarlyHints = EarlyHints;
(function (EarlyHints) {
})(EarlyHints = exports.EarlyHints || (exports.EarlyHints = {}));
//# sourceMappingURL=early-hints.js.map