# @node-loader/http

> An http and https nodejs loader

Latest version **2.0.0** (published 2021-11-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @node-loader/http
pnpm add @node-loader/http
yarn add @node-loader/http
bun add @node-loader/http
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2021-11-09 |
| First published | 2020-09-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >= 12.0.0 |
| Dependencies | 1 |
| Unpacked size | 56.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | Joel Denning |
| Maintainers | joeldenning |
| Keywords | node, loader, http, https |

## Links

- npm: https://www.npmjs.com/package/@node-loader/http
- Repository: https://github.com/node-loader/node-loader-http
- Homepage: https://github.com/node-loader/node-loader-http#readme
- Issues: https://github.com/node-loader/node-loader-http/issues
- npm.io page: https://npm.io/package/@node-loader/http

## Dependencies (1)

- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.0

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2021-11-09
- 1.1.0 — 2021-08-03
- 1.0.1 — 2020-09-05
- 1.0.0 — 2020-09-05

## README

# @node-loader/http

A [nodejs loader](https://nodejs.org/dist/latest-v13.x/docs/api/esm.html#esm_experimental_loaders) for loading modules over the network with http/https.

## Installation

```sh
npm install --save @node-loader/http

# Or, if you prefer Yarn
yarn add --save @node-loader/http
```

NodeJS 16.12 changed the Node Loader API. If using NodeJS@<16.12, please use `@node-loader/http@1`. Otherwise, use `@node-loader/http@latest`.

## Usage

Create a file that imports a module over http:

```js
import * as singleSpa from "http://unpkg.com/single-spa@5.5.5/lib/esm/single-spa.dev.js";
```

Now run node with the `--experimental-loader` flag:

```sh
node --experimental-loader @node-loader/http file.js
```

## Semantics

This project uses [node-fetch](https://github.com/node-fetch/node-fetch) to implement familiar HTTP semantics,
including http redirects, https redirects, HTTP status checks, etc. Customizing the behavior of node-fetch is
planned, but not yet implemented.

## Composition

If you wish to combine http loader with other NodeJS loaders, you may do so by using [node-loader-core](https://github.com/node-loader/node-loader-core).

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