# helper-xhr

> Simple promised xhr

Latest version **1.3.3** (published 2021-02-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install helper-xhr
pnpm add helper-xhr
yarn add helper-xhr
bun add helper-xhr
```

## 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.3.3 |
| Published | 2021-02-09 |
| First published | 2018-01-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Max Favilli |
| Maintainers | max.favilli |
| Keywords | xhr, ajax, promise |

## Links

- npm: https://www.npmjs.com/package/helper-xhr
- Repository: https://github.com/max-favilli/helper-xhr
- Homepage: https://github.com/max-favilli/helper-xhr#readme
- Issues: https://github.com/max-favilli/helper-xhr/issues
- npm.io page: https://npm.io/package/helper-xhr

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 1.3.3 (latest) — 2021-02-09
- 1.3.2 — 2021-02-09
- 1.3.1 — 2021-02-09
- 1.3.0 — 2021-02-09
- 1.2.0 — 2018-09-01
- 1.0.4 — 2018-06-14
- 1.0.2 — 2018-01-31
- 1.0.1 — 2018-01-26
- 1.0.0 — 2018-01-25

## README

# Helper XHR

Very basic, very simple, xhr promise wrapper.
I started using [fetch](https://github.github.io/fetch/), and soon discovered ["replay xhr" is not supported in browsers](http://stackoverflow.com/questions/42908939/how-to-replay-a-fetch-in-chrome-developer-tools) for fetch request.

So I created this miny/simple/basic xhr request wrapper.

## Installation

```
npm install helper-xhr
```

There's no dependecy.

Yes it's in [ES6](https://github.com/lukehoban/es6features).

## Usage

```
import HttpRequest from 'helper-xhr';

var xhr = new HttpRequest("POST", "/foo/bar/", "application/json");
xhr.send({elmer: "fudd"}).then((data) => {
	console.log("got this", data.json);
}).catch((e) => {
	console.log("something wrong", e);
});

console.log("headers", xhr.getAllResponseHeaders());
```

## Contributing

You are welcome!

## History

Created on March 22, 2017

## Credits

Don't blame me.

## License

Do whatever you want with it.

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