UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

38 lines • 1.32 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HTTPMethod = exports.BaseHTTPMethod = void 0; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. const resource_1 = require("../../../../core/resource.js"); const path_1 = require("../../../../internal/utils/path.js"); var BaseHTTPMethod = /* @__PURE__ */ (() => { class BaseHTTPMethod extends resource_1.APIResource { /** * Retrieves the top autonomous systems, by HTTP requests, of the requested HTTP * version. * * @example * ```ts * const httpMethod = * await client.radar.http.ases.httpMethod.get('HTTPv1'); * ``` */ get(httpVersion, query = {}, options) { return this._client.get((0, path_1.path) `/radar/http/top/ases/http_version/${httpVersion}`, { query, ...options, })._thenUnwrap((obj) => obj.result); } } BaseHTTPMethod._key = Object.freeze([ 'radar', 'http', 'ases', 'httpMethod', ]); return BaseHTTPMethod; })(); exports.BaseHTTPMethod = BaseHTTPMethod; class HTTPMethod extends BaseHTTPMethod { } exports.HTTPMethod = HTTPMethod; //# sourceMappingURL=http-method.js.map