OptionalfetchCustom fetch function implementation.
For Node.js versions before 20 that lack native fetch support, provide a
polyfill such as node-fetch. This allows the same connection
configuration to work across all Node.js versions.
Optionalinit: RequestInitOptionalheadersCustom HTTP headers to send with every request.
Common use cases include authentication tokens, API keys, and content negotiation headers. Values can be primitives or arrays.
Base URL of the remote HTTP server.
Must include protocol (http:// or https://) and may include port. Example:
"https://api.example.com" or "http://localhost:3000".
OptionaloptionsAdditional fetch API options.
Configure caching, CORS mode, credentials handling, and other fetch-specific behaviors. These options are passed directly to the underlying fetch call.
HTTP connection configuration for remote server communication.
IHttpConnectiondefines connection settings required to communicate with remote HTTP servers. This interface is primarily used by@nestia/fetcherand generated SDK functions to establish HTTP connections.The host property specifies the base URL of the target server, while headers allows passing custom HTTP headers with each request. For fine-grained control over fetch behavior, use options to configure caching, CORS, credentials, and other fetch API settings.
In Node.js versions prior to 20 (which lack native fetch), provide a polyfill like
node-fetchvia the fetch property.Author
Jeongho Nam - https://github.com/samchon
Author
Seungjun We - https://github.com/SeungjunWe