@web-bee-ru/openapi-axios
Version:
A TypeScript abstraction over Axios for typed requests generated from OpenAPI (Swagger) schemas using openapi-typescript.
13 lines • 523 B
JavaScript
/**
* @description A constant array of HTTP methods that typically include a request body.
*/
export const 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.
*/
export function isMethodWithBody(method) {
return METHODS_WITH_BODY.includes(method);
}
//# sourceMappingURL=methods.js.map