UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

34 lines • 1.15 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../../../core/resource.mjs"; import { path } from "../../../../internal/utils/path.mjs"; export var BaseHTTPProtocol = /* @__PURE__ */ (() => { class BaseHTTPProtocol extends APIResource { /** * Retrieves the top locations, by HTTP requests, of the requested HTTP protocol. * * @example * ```ts * const httpProtocol = * await client.radar.http.locations.httpProtocol.get( * 'HTTP', * ); * ``` */ get(httpProtocol, query = {}, options) { return this._client.get(path `/radar/http/top/locations/http_protocol/${httpProtocol}`, { query, ...options, })._thenUnwrap((obj) => obj.result); } } BaseHTTPProtocol._key = Object.freeze([ 'radar', 'http', 'locations', 'httpProtocol', ]); return BaseHTTPProtocol; })(); export class HTTPProtocol extends BaseHTTPProtocol { } //# sourceMappingURL=http-protocol.mjs.map