# @ember-data/request-utils

> (Legacy) Request Building Utilities for use with EmberData

Latest version **5.9.1** (published 2026-09-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ember-data/request-utils
pnpm add @ember-data/request-utils
yarn add @ember-data/request-utils
bun add @ember-data/request-utils
```

## Health

**Score 65/100 (B)** — status: active.

Positive: esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 5.9.1 |
| Published | 2026-09-05 |
| First published | 2023-07-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 322.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 3156 |
| Author | Chris Thoburn <runspired@users.noreply.github.com> |
| Maintainers | ember-data-admin, runspired, richgt, hm_krystan, katiegengler |
| Keywords | ember-addon |

## Links

- npm: https://www.npmjs.com/package/@ember-data/request-utils
- Repository: https://github.com:warp-drive-data/warp-drive
- Homepage: https://github.com/warp-drive-data/warp-drive
- Issues: https://github.com/warp-drive-data/warp-drive/issues
- npm.io page: https://npm.io/package/@ember-data/request-utils

## Dependencies (3)

- [@warp-drive/core](https://npm.io/package/@warp-drive/core.md) 5.9.1
- [@embroider/macros](https://npm.io/package/@embroider/macros.md) ^1.20.6
- [@warp-drive/utilities](https://npm.io/package/@warp-drive/utilities.md) 5.9.1

## Recent versions

- 5.9.1 (latest) — 2026-09-05
- 5.10.0-alpha.13 (canary) — 2026-09-29
- 5.9.0-beta.3 (beta) — 2026-09-05
- 4.13.0-alpha.9 (v4-canary) — 2025-05-15
- 5.3.13 (lts) — 2025-04-11
- 4.12.8 (lts-4-12) — 2024-05-08
- 5.10.0-alpha.12 — 2026-09-25
- 5.10.0-alpha.10 — 2026-09-23
- 5.10.0-alpha.9 — 2026-09-22
- 5.10.0-alpha.8 — 2026-09-18
- 5.10.0-alpha.7 — 2026-09-15
- 5.10.0-alpha.6 — 2026-09-11
- 5.10.0-alpha.5 — 2026-09-11
- 5.10.0-alpha.4 — 2026-09-10
- 5.10.0-alpha.3 — 2026-09-10
- … 368 more at https://npm.io/package/@ember-data/request-utils/versions

## README

<p align="center">
  <img
    class="project-logo"
    src="./logos/logo-yellow-slab.svg"
    alt="WarpDrive"
    width="180px"
    title="WarpDrive"
    />
</p>

![NPM Stable Version](https://img.shields.io/npm/v/ember-data/latest?label=version&style=flat&color=fdb155)
![NPM Downloads](https://img.shields.io/npm/dm/ember-data.svg?style=flat&color=fdb155)
![License](https://img.shields.io/github/license/warp-drive-data/warp-drive.svg?style=flat&color=fdb155)
[![EmberJS Discord Community Server](https://img.shields.io/badge/EmberJS-grey?logo=discord&logoColor=fdb155)](https://discord.gg/zT3asNS
)
[![WarpDrive Discord Server](https://img.shields.io/badge/WarpDrive-grey?logo=discord&logoColor=fdb155)](https://discord.gg/PHBbnWJx5S
)

<p align="center">
  <br>
  <a href="https://warp-drive.io">WarpDrive</a> is the lightweight data library for web apps &mdash;
  <br>
  universal, typed, reactive, and ready to scale.
  <br/><br/>
</p>

---

# @ember-data/request-utils

<p align="center">Utilities for Requests</p>

> [!WARNING]
> **⚠️ This package only exists for backwards compatibility**
>
> Newer apps should use [@warp-drive/utilities](https://warp-drive.io/api/@warp-drive/utilities/)


This package provides Simple utility function to assist in url building, query params, and other common request operations.

It's built for [*Ember***Data**](https://github.com/warp-drive-data/warp-drive/) but useful more broadly if you're looking for lightweight functions to assist in working with urls and query params.

## Installation

Install using your javascript package manager of choice. For instance with [pnpm](https://pnpm.io/)

```sh
pnpm add @ember-data/request-utils
```

**Tagged Releases**

- ![NPM Canary Version](https://img.shields.io/npm/v/%40ember-data/request-utils/canary?label=%40canary&color=FFBF00)
- ![NPM Beta Version](https://img.shields.io/npm/v/%40ember-data/request-utils/beta?label=%40beta&color=ff00ff)
- ![NPM Stable Version](https://img.shields.io/npm/v/%40ember-data/request-utils/latest?label=%40latest&color=90EE90)
- ![NPM LTS Version](https://img.shields.io/npm/v/%40ember-data/request-utils/lts?label=%40lts&color=0096FF)
- ![NPM LTS 4.12 Version](https://img.shields.io/npm/v/%40ember-data/request-utils/lts-4-12?label=%40lts-4-12&color=bbbbbb)


## Utils

- [buildBaseUrl]()
- [sortQueryParams]()
- [buildQueryParams]()
- [filterEmpty]()

### As a Library Primitive

These primitives may be used directly or composed by request builders to provide a consistent interface for building requests.

For instance:

```ts
import { buildBaseURL, buildQueryParams } from '@ember-data/request-utils';

const baseURL = buildBaseURL({
  host: 'https://api.example.com',
  namespace: 'api/v1',
  resourcePath: 'emberDevelopers',
  op: 'query',
  identifier: { type: 'ember-developer' }
});
const url = `${baseURL}?${buildQueryParams({ name: 'Chris', include:['pets'] })}`;
// => 'https://api.example.com/api/v1/emberDevelopers?include=pets&name=Chris'
```

This is useful, but not as useful as the REST request builder for query which is sugar over this (and more!):

```ts
import { query } from '@ember-data/rest/request';

const options = query('ember-developer', { name: 'Chris', include:['pets'] });
// => { url: 'https://api.example.com/api/v1/emberDevelopers?include=pets&name=Chris' }
// Note: options will also include other request options like headers, method, etc.
```

---
_Source: https://npm.io/package/@ember-data/request-utils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
