[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [Http](https://evolu.dev/docs/api-reference/common/Http) › FetchMode

```ts
type FetchMode = "text" | "json" | "bytes" | "headers";
```

Defined in: [packages/common/src/Http.ts:52](https://github.com/evoluhq/evolu/blob/a18269a1b822c670b507c6a9b73b23eed32551fe/packages/common/src/Http.ts#L52)

Body mode for [fetch](https://evolu.dev/docs/api-reference/common/Http/functions/fetch).

A mode selects a built-in consumer that reads the [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) inside the
fetch Task:

- `"bytes"` — reads the body as a `Uint8Array<ArrayBuffer>`.
- `"headers"` — cancels the body and returns [FetchResponse](https://evolu.dev/docs/api-reference/common/Http/type-aliases/FetchResponse). Pair it with
  `{ method: "HEAD" }` when the server should not send a body.
- `"json"` — parses the body as JSON and returns `unknown`. Narrow or decode at
  the call site; there is deliberately no generic to cast through.
- `"text"` — reads the body as a string.

Body modes (`"bytes"`, `"json"`, `"text"`) return [FetchStatusError](https://evolu.dev/docs/api-reference/common/Http/interfaces/FetchStatusError) for
non-2xx responses. `"headers"` does not judge status, because the status is
usually the value being asked for.