Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@huksley/request

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@huksley/request

[gist-sized] Zero dependency, single-file NodeJS 14+ HTTP(s) request module

  • 1.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

HTTP(s) Request

NPM version NPM Size NPM Downloads

Use as a dependency or copy-paste directly into your code. Zero-dependency alternative of fetch for NodeJS (with different API).

const { request } = require("@huksley/request");

request("https://jsonip.com").then((res) => {
  console.info("Your IP", res.body.ip, "headers", res.headers);
});

ESM

import { request } from "@huksley/request";

const res = await request("https://jsonip.com");
console.info("Your IP", res.body.ip, "headers", res.headers);

Features

  • Both CommonJS and ESM environment supported.
  • Single-file & gist-sized
  • Handles JSON transparently
  • Handles binary
  • Handles compressed bodies (deflate, brotli, gzip)
  • Promise-based
  • Default timeout provided

Keywords

FAQs

Package last updated on 12 Aug 2022

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc