0.1.2 • Published 2 years ago

spett v0.1.2

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Spett HTTP Client

Thin HTTP Client.

Automatically converts JSON data to objects if the content type is application/json.

Install

npm i spett

Usage

const request = require('spett')

// Default options
const options = {
  host: 'localhost',
  port: '9090',
  path: '/',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  }
}

// The data, the status code and the response object
const { data, code, res } = await request({ path: '/hello'}, options)

ISC Licensed. Enjoy!

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago