1.5.4 • Published 6 years ago

httpstat v1.5.4

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

httpstat

Build Status

httpstat is a curl like tool, visualize http/https process and show the duration.

image

Reference from python httpstat and go httpstat

Install as tool

$ npm install httpstat -g 

Usage as tool

$ httpstat http://example.com/
$ httpstat -X POST -d test http://example.com/

Install as library

$ npm install httpstat -S

Usage as library

const httpstat = require('httpstat');

httpstat('http://example.com', /* option, headers, body */).then((result) => {
  console.log(result); // time property has duration time.
}).catch((e) => {
  console.error(e);
});

API

httpstat(url, options, headers, body) - return Promise

  • url, type: string, url is a request target url. required.
  • options, type: object, options is a http(s) request options see node http API
  • headers, type: array, headers is http request headers like "Content-Type: application/json"
  • body, type: string, body is http request body.
1.5.4

6 years ago

1.5.3

6 years ago

1.5.2

8 years ago

1.5.1

8 years ago

1.5.0

9 years ago

1.4.0

10 years ago

1.3.0

10 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago