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
11 lines (10 loc) • 375 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.InvalidURLError = void 0;
class InvalidURLError extends Error {
constructor(url) {
super(`A valid URL is required, received: ${url}. Ensure the URL starts with "http://" or "https://".`);
this.name = "InvalidURLError";
}
}
exports.InvalidURLError = InvalidURLError;