UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

27 lines • 1.01 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../core/resource.mjs"; import { buildHeaders } from "../../internal/headers.mjs"; import { path } from "../../internal/utils/path.mjs"; export var BaseContent = /* @__PURE__ */ (() => { class BaseContent extends APIResource { /** * Fetches the content of a snippet belonging to the zone. */ get(snippetName, params, options) { const { zone_id } = params; return this._client.get(path `/zones/${zone_id}/snippets/${snippetName}/content`, { ...options, headers: buildHeaders([{ Accept: 'multipart/form-data' }, options?.headers]), __binaryResponse: true, }); } } BaseContent._key = Object.freeze([ 'snippets', 'content', ]); return BaseContent; })(); export class Content extends BaseContent { } //# sourceMappingURL=content.mjs.map