# popsicle-transport-xhr

> Popsicle transport for sending requests over `XMLHttpRequest`

Latest version **2.0.0** (published 2020-10-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install popsicle-transport-xhr
pnpm add popsicle-transport-xhr
yarn add popsicle-transport-xhr
bun add popsicle-transport-xhr
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2020-10-07 |
| First published | 2019-06-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 23.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Blake Embrey |
| Maintainers | blakeembrey |
| Keywords | popsicle, transport, xhr, browser, xmlhttprequest |

## Links

- npm: https://www.npmjs.com/package/popsicle-transport-xhr
- Repository: https://github.com/serviejs/popsicle-transport-xhr
- Issues: https://github.com/serviejs/popsicle-transport-xhr/issues
- npm.io page: https://npm.io/package/popsicle-transport-xhr

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2020-10-07
- 1.0.2 — 2019-06-15
- 1.0.1 — 2019-06-15
- 1.0.0 — 2019-06-11

## README

# Popsicle Transport XHR

[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]
[![Build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]

> Popsicle transport for sending requests over `XMLHttpRequest`.

## Installation

```
npm install popsicle-transport-xhr --save
```

## Usage

```js
import { transport } from "popsicle-transport-xhr";

const req = new Request("/");
const res = await transport()(req, done);
```

### Transport Options

The `transport` function sends the Servie `Request` to a remote server.

- `type?: XMLHttpRequestResponseType` Override response type
- `withCredentials?: boolean` Enable `withCredentials`
- `overrideMimeType?: string` Override MIME type

## TypeScript

This project is written using [TypeScript](https://github.com/Microsoft/TypeScript) and publishes the definitions directly to NPM.

## License

MIT

[npm-image]: https://img.shields.io/npm/v/popsicle-transport-xhr.svg?style=flat
[npm-url]: https://npmjs.org/package/popsicle-transport-xhr
[downloads-image]: https://img.shields.io/npm/dm/popsicle-transport-xhr.svg?style=flat
[downloads-url]: https://npmjs.org/package/popsicle-transport-xhr
[travis-image]: https://img.shields.io/travis/serviejs/popsicle-transport-xhr.svg?style=flat
[travis-url]: https://travis-ci.org/serviejs/popsicle-transport-xhr
[coveralls-image]: https://img.shields.io/coveralls/serviejs/popsicle-transport-xhr.svg?style=flat
[coveralls-url]: https://coveralls.io/r/serviejs/popsicle-transport-xhr?branch=master

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