# stackerjs-http

> [![Travis](https://img.shields.io/travis/parpeoficial/stackerjs-http.svg)](https://travis-ci.org/parpeoficial/stackerjs) [![Test Coverage](https://api.codeclimate.com/v1/badges/3ab7310303fc5193b4cf/test_coverage)](https://codeclimate.com/github/parpeofici

Latest version **1.2.2** (published 2018-06-26) · 0 weekly downloads

## Install

```sh
npm install stackerjs-http
pnpm add stackerjs-http
yarn add stackerjs-http
bun add stackerjs-http
```

## 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 | 1.2.2 |
| Published | 2018-06-26 |
| First published | 2018-02-16 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 208.2 KB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Vinicius Guedes |
| Maintainers | parpeoficial |

## Links

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

## Dependencies (4)

- [axios](https://npm.io/package/axios.md) ^0.18.0
- [babel-polyfill](https://npm.io/package/babel-polyfill.md) ^6.26.0
- [stackerjs-types](https://npm.io/package/stackerjs-types.md) ^1.1.4
- [stackerjs-utils](https://npm.io/package/stackerjs-utils.md) ^1.1.3

## Recent versions

- 1.2.2 (latest) — 2018-06-26
- 1.2.1 — 2018-05-24
- 1.2.0 — 2018-05-22
- 1.1.2 — 2018-05-22
- 0.0.0-development — 2018-05-21
- 1.1.1 — 2018-05-17
- 1.1.0 — 2018-04-20
- 1.0.3 — 2018-02-20
- 1.0.2 — 2018-02-20
- 1.0.1 — 2018-02-20
- 1.0.0 — 2018-02-20
- 0.2.2 — 2018-02-16
- 0.2.1 — 2018-02-16
- 0.2.0 — 2018-02-16
- 0.1.0 — 2018-02-16

## README

[![Travis](https://img.shields.io/travis/parpeoficial/stackerjs-http.svg)](https://travis-ci.org/parpeoficial/stackerjs)
[![Test Coverage](https://api.codeclimate.com/v1/badges/3ab7310303fc5193b4cf/test_coverage)](https://codeclimate.com/github/parpeoficial/stackerjs-http/test_coverage)
[![Maintainability](https://api.codeclimate.com/v1/badges/3ab7310303fc5193b4cf/maintainability)](https://codeclimate.com/github/parpeoficial/stackerjs-http/maintainability)
[![dependencies Status](https://david-dm.org/parpeoficial/stackerjs-http/status.svg)](https://david-dm.org/parpeoficial/stackerjs-http)
[![npm](https://img.shields.io/npm/dt/stackerjs-http.svg)](https://www.npmjs.com/package/stackerjs)

[![NPM](https://nodei.co/npm/stackerjs-http.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/stackerjs/)

![StackerJS](https://s3-sa-east-1.amazonaws.com/parpe.prod/StackerJS-logo.png)

# Http

Package for managing Http requests and responses in and outside [StackerJS](https://github.com/parpeoficial/stackerjs)

## Usage

### Response

```javascript
import { Http } from "stackerjs-http";

let httpResponse = new Http.Response();

httpResponse.setContent({ status: true });
httpResponse.setContent("Everything is ok"); // or
httpResponse.setContent(new Buffer("Something")); // or

httpResponse.setStatusCode(200);
```

### MakeRequest

```javascript
new Http.MakeRequest()
  .setPort(3000)
  .setHeader("Authorization", "Bearer some-token")
  .get("/v1/some/api", { limit: 10 }) // same for post(), put(), delete() or patch()
  .then(httpResponse => {
    // instance of Http.Response
    let content = httpResponse.getContent();
  });
```

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