UNPKG

simple-fetch-ts

Version:

`simple-fetch-ts` is a TypeScript library designed to simplify HTTP requests using a builder-pattern approach. It provides a fluent API for creating, configuring, and executing various HTTP methods (`GET`, `POST`, `PUT`, `PATCH`, `DELETE`) with type safet

13 lines (12 loc) 444 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.InvalidMethodBodyError = void 0; class InvalidMethodBodyError extends Error { constructor(method, url) { super(`${method} requests should not have a body. Request made to: ${url}`); this.name = "InvalidMethodBodyError"; this.method = method; this.url = url; } } exports.InvalidMethodBodyError = InvalidMethodBodyError;