cloudflare
Version:
The official TypeScript library for the Cloudflare API
23 lines • 962 B
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from 'cloudflare/resource';
export class NELResource extends APIResource {
/**
* Automatically optimize image loading for website visitors on mobile devices.
* Refer to our [blog post](http://blog.cloudflare.com/nel-solving-mobile-speed)
* for more information.
*/
edit(params, options) {
const { zone_id, ...body } = params;
return this._client.patch(`/zones/${zone_id}/settings/nel`, { body, ...options })._thenUnwrap((obj) => obj.result);
}
/**
* Enable Network Error Logging reporting on your zone. (Beta)
*/
get(params, options) {
const { zone_id } = params;
return this._client.get(`/zones/${zone_id}/settings/nel`, options)._thenUnwrap((obj) => obj.result);
}
}
(function (NELResource) {
})(NELResource || (NELResource = {}));
//# sourceMappingURL=nel.mjs.map