cloudflare
Version:
The official TypeScript library for the Cloudflare API
34 lines • 1.74 kB
JavaScript
;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.ResponseBufferingResource = void 0;
const resource_1 = require("cloudflare/resource");
class ResponseBufferingResource extends resource_1.APIResource {
/**
* Enables or disables buffering of responses from the proxied server. Cloudflare
* may buffer the whole payload to deliver it at once to the client versus allowing
* it to be delivered in chunks. By default, the proxied server streams directly
* and is not buffered by Cloudflare. This is limited to Enterprise Zones.
*/
edit(params, options) {
const { zone_id, ...body } = params;
return this._client.patch(`/zones/${zone_id}/settings/response_buffering`, {
body,
...options,
})._thenUnwrap((obj) => obj.result);
}
/**
* Enables or disables buffering of responses from the proxied server. Cloudflare
* may buffer the whole payload to deliver it at once to the client versus allowing
* it to be delivered in chunks. By default, the proxied server streams directly
* and is not buffered by Cloudflare. This is limited to Enterprise Zones.
*/
get(params, options) {
const { zone_id } = params;
return this._client.get(`/zones/${zone_id}/settings/response_buffering`, options)._thenUnwrap((obj) => obj.result);
}
}
exports.ResponseBufferingResource = ResponseBufferingResource;
(function (ResponseBufferingResource) {
})(ResponseBufferingResource = exports.ResponseBufferingResource || (exports.ResponseBufferingResource = {}));
//# sourceMappingURL=response-buffering.js.map