Fetch
Officialv6.2.0@kubb/plugin-fetch
kubb add plugin-fetch
How-to guides
7 guides
Call operationsCall a generated function with grouped request options, read the typed result, and pass content types or native fetch settings for one call.Configure requestsSet the base URL, credentials, shared headers, and interceptors on the generated Fetch client, for every call or for one.Handle errorsHandle HTTP and network errors in the generated Fetch client with ResponseError, or return errors as values with throwOnError: false.Migrate to v6Upgrade @kubb/plugin-fetch from v5 to v6, which runs on the shared client core from @kubb/plugin-client, the same core as @kubb/plugin-axios.Configure serializationConfigure how the generated Fetch client serializes OpenAPI parameters and encodes request and response bodies by media type.Server-sent eventsConsume typed server-sent events and JSON Lines with the generated Fetch client. Stop, resume, and handle streaming errors.Use a custom transportReplace the network send of the generated fetch client with another HTTP library or your own function.
