Socket
Book a DemoInstallSign in
Socket

@heroku/http-call

Package Overview
Dependencies
Maintainers
186
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@heroku/http-call

make http requests

latest
Source
npmnpm
Version
5.5.0
Version published
Maintainers
186
Created
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

http

FAQs

Package last updated on 19 May 2025

Did you know?

Socket

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