---
url: "https://vueda.dev/v3/reference/api/js/utils/fetchSupport.md"
title: "utils/fetchSupport"
---

# utils/fetchSupport

## Overview

Low-level fetch helper that decodes responses and wraps failures in typed errors.

## Methods

- [actionRequestHeaders](/v3/reference/api/js/utils/fetchSupport/functions/actionRequestHeaders.md) - Builds the headers every model-action request shares.
- [fetchHelper](/v3/reference/api/js/utils/fetchSupport/functions/fetchHelper.md) - Fetches a URL and returns the response.
- [getJsonOrText](/v3/reference/api/js/utils/fetchSupport/functions/getJsonOrText.md) - Fetches a URL and returns the response.
- [readActionResponse](/v3/reference/api/js/utils/fetchSupport/functions/readActionResponse.md) - Classifies a model-action response the way every VUEDA action CRUD handler does: a 400 carries field errors, a 409 carries warnings the operator has not acknowledged, and anything else outside the success set is a fetch failure.

## Types

### [CancellablePromise](/v3/reference/api/js/utils/fetchSupport/types/CancellablePromise.md)

future: webstorm doesn't understand import("@arrai-innovations/reactive-helpers/use/cancellableIntent.js").CancellablePromise
 so we are copying the type definition here

`CancellablePromise = Promise & object`

### [MaybeCancellablePromise](/v3/reference/api/js/utils/fetchSupport/types/MaybeCancellablePromise.md)

`MaybeCancellablePromise = Promise & object`

## Source

`client/lib/utils/fetchSupport.js:1`
