# @mondopower/fetch

> Library to use to wrap node fetch

Latest version **1.2.2** (published 2025-01-20) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @mondopower/fetch
pnpm add @mondopower/fetch
yarn add @mondopower/fetch
bun add @mondopower/fetch
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; no vulnerabilities; has provenance; high quality score.

Warnings: low downloads; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.2 |
| Published | 2025-01-20 |
| First published | 2024-03-21 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 40.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| Maintainers | daryl-miller, mondo-ci |
| Keywords | fetch, mondo, projen, typescript |

## Links

- npm: https://www.npmjs.com/package/@mondopower/fetch
- Repository: https://github.com/MondoPower/mondo-common-libs
- Homepage: https://github.com/MondoPower/mondo-common-libs#readme
- Issues: https://github.com/MondoPower/mondo-common-libs/issues
- npm.io page: https://npm.io/package/@mondopower/fetch

## Dependencies (1)

- [@mondopower/result-types](https://npm.io/package/@mondopower/result-types.md) ^1.2.1

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.2.2 (latest) — 2025-01-20
- 1.2.1 — 2024-12-03
- 1.2.0 — 2024-03-25
- 1.1.551 — 2024-03-21

## README

This package represents an http client library to perform http requests with interceptors, redaction etc.

# Usage #
const client = new FetchClient({authorizationToken, baseUrl})
const result = await client.get('urlpath')

If an error occurred the result will contain an isErrored = true and an error property including a type and a message
if (result.isErrored)
  console.log(result.error.errorType, result.error.message)

otherwise the result will contain the data property

console.log(result.data)

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