# developit/unfetch

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/developit-unfetch).**

5,712 stars · 202 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/developit/unfetch
- Homepage: https://npm.im/unfetch
- awesome-repositories: https://awesome-repositories.com/repository/developit-unfetch.md

## Description

unfetch is an isomorphic HTTP client and network library that provides a promise-based interface for performing network requests consistently across both browser and server environments. It serves as a lightweight implementation of the Fetch API for environments that lack native support for making network requests.

The library enables the retrieval of web resources as text, JSON, or binary blobs while maintaining a small memory footprint. It functions as a polyfill by installing the fetch interface into the global namespace when native browser support is unavailable.

The tool covers broad capabilities for web resource retrieval, including the ability to execute HTTP requests, inspect response headers, and parse response content.

## Tags

### Networking & Communication

- [Isomorphic HTTP Clients](https://awesome-repositories.com/f/networking-communication/isomorphic-http-clients.md) — Implements a promise-based interface for performing network requests consistently across both browser and server environments.
- [Metric Data URL Fetches](https://awesome-repositories.com/f/networking-communication/direct-url-retrievals/metric-data-url-fetches.md) — Retrieves web resources using asynchronous promises with configurable methods, headers, and bodies. ([source](https://github.com/developit/unfetch/blob/main/README.md))
- [Request Execution](https://awesome-repositories.com/f/networking-communication/http-request-customization/request-execution.md) — Executes HTTP requests by switching between different implementation drivers based on the runtime environment. ([source](https://github.com/developit/unfetch/tree/master/packages/isomorphic-unfetch))
- [HTTP Request Execution](https://awesome-repositories.com/f/networking-communication/http-request-execution.md) — Performs standard synchronous and asynchronous HTTP operations across both browser and server environments. ([source](https://github.com/developit/unfetch/tree/main/packages/isomorphic-unfetch))
- [Isomorphic](https://awesome-repositories.com/f/networking-communication/network-infrastructure-routing/network-routing-traffic-management/request-routing/isomorphic.md) — Routes network calls to the appropriate underlying driver based on whether the code is running in a browser or server.
- [Network Implementation Switching](https://awesome-repositories.com/f/networking-communication/networking-libraries/network-implementation-switching.md) — Switches between native browser APIs and server-side network modules depending on the detected execution runtime.
- [Promise-Based HTTP Clients](https://awesome-repositories.com/f/networking-communication/promise-based-http-clients.md) — Provides a promise-based interface for making asynchronous network requests consistently across multiple platforms.
- [Response Header Extractors](https://awesome-repositories.com/f/networking-communication/response-header-extractors.md) — Extracts header keys and values from network responses to verify metadata and server instructions. ([source](https://github.com/developit/unfetch#readme))

### Web Development

- [Fetch Polyfills](https://awesome-repositories.com/f/web-development/fetch-api-integrations/fetch-polyfills.md) — Implements the official web fetch specification to provide a consistent API across legacy and modern environments.
- [Isomorphic Networking Libraries](https://awesome-repositories.com/f/web-development/isomorphic-networking-libraries.md) — Provides a compact tool for retrieving web resources as text, JSON, or binary blobs across different environments.
- [Network Resource Retrievals](https://awesome-repositories.com/f/web-development/network-resource-retrievals.md) — Retrieves web resources using asynchronous promises that resolve into standardized response objects. ([source](https://github.com/developit/unfetch#readme))
- [Networking Libraries](https://awesome-repositories.com/f/web-development/networking-libraries.md) — Offers a minimalist implementation for executing HTTP requests and parsing responses with a small memory footprint.

### Programming Languages & Runtimes

- [Promise-Based API Wrappers](https://awesome-repositories.com/f/programming-languages-runtimes/promise-based-api-wrappers.md) — Wraps asynchronous network operations in promises to provide a standardized interface for request and response cycles.
- [Cross-Environment Polyfills](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/runtime-environments/runtimes/javascript-and-web-standard/api-polyfills/cross-environment-polyfills.md) — Provides an abstract networking layer that allows the same API to function identically in Node.js and browser environments.

### DevOps & Infrastructure

- [Response Body Parsing](https://awesome-repositories.com/f/devops-infrastructure/response-parsing-utilities/response-body-parsing.md) — Provides utilities to convert raw network response payloads into structured formats such as JSON, text, or binary blobs.

### Software Engineering & Architecture

- [Global](https://awesome-repositories.com/f/software-engineering-architecture/namespace-management/namespace-injections/global.md) — Attaches the fetch implementation to the global object to ensure compatibility with code expecting a native API.

### Part of an Awesome List

- [API Layer](https://awesome-repositories.com/f/awesome-lists/devtools/api-layer.md) — Lightweight fetch polyfill for older environments.
