# f-intercept

> a thin wrapper around the fetch api to provide you with a subscribe function to intercept 401 status responses, uses @export-mike/efetch for caching etags

Latest version **1.2.0** (published 2016-08-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install f-intercept
pnpm add f-intercept
yarn add f-intercept
bun add f-intercept
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2016-08-12 |
| First published | 2016-04-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | export-mike |
| Maintainers | mikeljames |
| Keywords | http, intercept, 401, etag |

## Links

- npm: https://www.npmjs.com/package/f-intercept
- Repository: https://github.com/export-mike/export-mike-f
- Homepage: https://github.com/export-mike/f-intercept#readme
- Issues: https://github.com/export-mike/f-intercept/issues
- npm.io page: https://npm.io/package/f-intercept

## Dependencies (4)

- [url](https://npm.io/package/url.md) ^0.11.0
- [curry](https://npm.io/package/curry.md) ^1.2.0
- [f-etag](https://npm.io/package/f-etag.md) ^1.0.0-rc2
- [isomorphic-fetch](https://npm.io/package/isomorphic-fetch.md) ^2.2.1

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.2.0 (latest) — 2016-08-12
- 1.1.0 — 2016-08-11
- 1.0.0 — 2016-05-26
- 1.0.0-rc6 — 2016-04-07
- 1.0.0-rc5 — 2016-04-07
- 1.0.0-rc4 — 2016-04-07

## README

# f-intercept
a thin wrapper around fetch api we use the eFetch library to handle basic e-tag caching in memory.

###Usage:
  
``` javascript
  import f, {onUnauth} from 'f-intercept'
  
  const apiFetch = f(BASE_API)
  
  apiFetch('path/to/resource', fetchOptions)
  
  onUnauth(BASE_API, () => {
    console.log('intercepted 401 unauthorized response')
  })
```

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