Socket
Socket
Sign inDemoInstall

http-call

Package Overview
Dependencies
11
Maintainers
4
Versions
62
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    http-call

make http requests


Version published
Weekly downloads
896K
decreased by-1.33%
Maintainers
4
Install size
230 kB
Created
Weekly downloads
 

Readme

Source

http-call

Greenkeeper badge

Usage

const {HTTP} = require('http-call')
const {body: user} = await HTTP.get('https://api.github.com/users/me')
// do something with user
// automatically converts from json

// for typescript specify the type of the body with a generic:
const {body: user} = await HTTP.get<{id: string, email: string}>('https://api.github.com/users/me')

// set headers
await HTTP.get('https://api.github.com', {headers: {authorization: 'bearer auth'}})

Keywords

FAQs

Last updated on 05 Dec 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc