Axios
Officialv6.0.4@kubb/plugin-axios
kubb add plugin-axios
How-to guides
7 guides
Call operationsCall a generated function with grouped request options, read the typed result, and pass content types or native axios settings for one call.Configure requestsSet the base URL, credentials, shared headers, and interceptors on the generated client, for every call or for one.Handle errorsCatch a ResponseError, return errors as values with throwOnError: false, and tell a 4xx or 5xx answer apart from a request that never completed.Migrate to v6Upgrade @kubb/plugin-axios from v5 to v6, which runs on the shared client core from @kubb/plugin-client with axios as the transport.Configure serializationChange how the generated client encodes parameters by their OpenAPI style and explode, and how it encodes and decodes bodies by media type.Server-sent eventsStream a text/event-stream or JSON Lines response as typed items, then stop, resume, and handle errors.Use a custom transportReplace the network send of the generated axios client with your own axios instance or function.
