UNPKG

@web-bee-ru/openapi-axios

Version:

A TypeScript abstraction over Axios for typed requests generated from OpenAPI (Swagger) schemas using openapi-typescript.

17 lines 704 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isMethodWithBody = exports.METHODS_WITH_BODY = void 0; /** * @description A constant array of HTTP methods that typically include a request body. */ exports.METHODS_WITH_BODY = ["post", "patch", "put"]; /** * @description Function to check if a given method is one that typically includes a request body. * @param method - The HTTP method to check. * @returns A boolean indicating whether the method is one that includes a request body. */ function isMethodWithBody(method) { return exports.METHODS_WITH_BODY.includes(method); } exports.isMethodWithBody = isMethodWithBody; //# sourceMappingURL=methods.js.map