---
title: "How-to guides · Fetch plugin · Kubb"
description: "How-to guides for @kubb/plugin-fetch, the Kubb Fetch plugin. Each guide walks through one task."
canonical_url: "https://kubb.dev/extensions/kubb-labs/plugin-fetch/guides"
meta:
  author: "Stijn Van Hulle"
  "og:description": "How-to guides for @kubb/plugin-fetch, the Kubb Fetch plugin. Each guide walks through one task."
  "og:image": "https://kubb.dev/_og/s/o_271fdcb0986bb649.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "How-to guides · Fetch plugin · Kubb"
  "twitter:image": "https://kubb.dev/_og/s/o_271fdcb0986bb649.png"
---

> Index of every page on this site: [llms.txt](https://kubb.dev/llms.txt)

![Fetch logo](https://kubb.dev/feature/javascript.svg)

**Fetch**

Officialv6.7.2

@kubb/plugin-fetch

**$**kubb add plugin-fetchkubb add plugin-fetch

# **How-to guides**

7 guides

[**Call operations**Call a generated function with grouped request options, read the typed result, and pass content types or native fetch settings for one call.](https://kubb.dev/extensions/kubb-labs/plugin-fetch/guides/calling-operations) [**Configure requests**Set the base URL, credentials, shared headers, and interceptors on the generated Fetch client, for every call or for one.](https://kubb.dev/extensions/kubb-labs/plugin-fetch/guides/configure-requests) [**Handle errors**Handle HTTP and network errors in the generated Fetch client with ResponseError, or return errors as values with throwOnError: false.](https://kubb.dev/extensions/kubb-labs/plugin-fetch/guides/error-handling) [**Migrate to v6**Upgrade @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.](https://kubb.dev/extensions/kubb-labs/plugin-fetch/guides/migrate-to-v6) [**Configure serialization**Configure how the generated Fetch client serializes OpenAPI parameters and encodes request and response bodies by media type.](https://kubb.dev/extensions/kubb-labs/plugin-fetch/guides/serialization) [**Server-sent events**Consume typed server-sent events and JSON Lines with the generated Fetch client. Stop, resume, and handle streaming errors.](https://kubb.dev/extensions/kubb-labs/plugin-fetch/guides/server-sent-events) [**Use a custom transport**Replace the network send of the generated fetch client with another HTTP library or your own function.](https://kubb.dev/extensions/kubb-labs/plugin-fetch/guides/transport)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://kubb.dev/#website","@type":"WebSite","description":"Kubb is an open source code generator that turns an API spec into TypeScript types, API clients, TanStack Query hooks, Zod schemas and mocks.","name":"Kubb","url":"https://kubb.dev/","publisher":{"@id":"https://kubb.dev/#identity"}},{"@id":"https://kubb.dev/extensions/kubb-labs/plugin-fetch/guides#webpage","@type":"WebPage","description":"How-to guides for @kubb/plugin-fetch, the Kubb Fetch plugin. Each guide walks through one task.","name":"How-to guides · Fetch plugin · Kubb","url":"https://kubb.dev/extensions/kubb-labs/plugin-fetch/guides","isPartOf":{"@id":"https://kubb.dev/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://kubb.dev/extensions/kubb-labs/plugin-fetch/guides"]}],"primaryImageOfPage":{"@id":"https://kubb.dev/#logo"}},{"@id":"https://kubb.dev/#identity","@type":"Organization","description":"Kubb is an open source code generator. It turns an API spec, such as OpenAPI, into TypeScript types, API clients, TanStack Query hooks, Zod schemas and mocks.","email":"kubb@kubb.dev","name":"Kubb","url":"https://kubb.dev","founder":{"@id":"https://kubb.dev/#founder"},"logo":{"@id":"https://kubb.dev/#logo"},"sameAs":["https://github.com/kubb-labs/kubb","https://discord.gg/shfBFeczrm","https://www.linkedin.com/company/kubb-labs"]},{"@id":"https://kubb.dev/#logo","@type":"ImageObject","caption":"Kubb","contentUrl":"https://kubb.dev/logo.png","inLanguage":"en","url":"https://kubb.dev/logo.png"}]}
```

## Sitemap

See the full [sitemap](https://kubb.dev/sitemap.md) for all pages.
