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