1.2.2 • Published 6 years ago

stackerjs-http v1.2.2

Weekly downloads
62
License
-
Repository
github
Last release
6 years ago

Travis Test Coverage Maintainability dependencies Status npm

NPM

StackerJS

Http

Package for managing Http requests and responses in and outside StackerJS

Usage

Response

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

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();
  });
1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago