UNPKG

@bytekit/autofetch

Version:

A TypeScript-first, decorator-based HTTP client for building elegant and modular API clients with fetch under the hood. Inspired by Spring's `@RestClient` and OpenFeign.

6 lines (5 loc) 204 B
import { ClientConstants } from "./constants.js"; const Client = (options) => (target) => { Reflect.defineMetadata(ClientConstants.ClientOptions, options, target.prototype); }; export default Client;