cloudflare
Version:
The official TypeScript library for the Cloudflare API
33 lines • 1.13 kB
JavaScript
// 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 autonomous systems, by HTTP requests, of the requested HTTP
* protocol.
*
* @example
* ```ts
* const httpProtocol =
* await client.radar.http.ases.httpProtocol.get('HTTP');
* ```
*/
get(httpProtocol, query = {}, options) {
return this._client.get(path `/radar/http/top/ases/http_protocol/${httpProtocol}`, {
query,
...options,
})._thenUnwrap((obj) => obj.result);
}
}
BaseHTTPProtocol._key = Object.freeze([
'radar',
'http',
'ases',
'httpProtocol',
]);
return BaseHTTPProtocol;
})();
export class HTTPProtocol extends BaseHTTPProtocol {
}
//# sourceMappingURL=http-protocol.mjs.map