Zero dependencies, lightweight, and asynchronous https requests package.

Overview

This project is a Work in Progress and currently in development. The API is subject to change without warning.

Lightfetch Banner

A small fetching package for super simple usages.
Built using zero dependencies to be lightweight and asynchronous
Lightfetch gives you the best of size, speed, and usability.


Install

npm install lightfetch-node

Usage

Main API

await lightfetch(url, [options]);

Options

  • method: HTTP Request Method
  • headers: HTTP Headers to use in Request
  • body: Data to use in the Request*

* Data that can be used in body includes an Object, a string that's in x-www-form-urlencoded format, or plain text. Lightfetch will figure out what you pass in automagically and set the appropriate headers.

Example

// using CommonJS
const { lightfetch } = require('lightfetch-node');

// using ESM
import { lightfetch } from 'lightfetch-node';

async function fetch(url) {
  const res = await lightfetch(url, {
    method: 'GET',
    headers: {
      'X-Requested-With': 'RayhanADev',
    },
  });
  console.log('Status:', res.status);
  console.log('Response:', res.toJSON());
}

fetch('https://postman-echo.com/get?foo=bar');
You might also like...

Helper package to handle requests to a jschan api instance.

jschan-api-sdk Helper package to handle requests to a jschan api instance. How to use npm install ussaohelcim/jschan-api-sdk const { jschan } = requir

Jun 30, 2022

Node.js package with a customized HTTP and HTTPS agents to prevent SSRF with hosts validations and custom DNS feature.

http-agent-dns This is a Node.js package with a customized HTTP and HTTPS agents to prevent SSRF with hosts validations with a possibility to use a cu

Jul 21, 2022

A table component for your Mantine data-rich applications, supporting asynchronous data loading, column sorting, custom cell data rendering, row context menus, dark theme, and more.

A table component for your Mantine data-rich applications, supporting asynchronous data loading, column sorting, custom cell data rendering, row context menus, dark theme, and more.

Mantine DataTable A "dark-theme aware" table component for your Mantine UI data-rich applications, featuring asynchronous data loading support, pagina

Jan 4, 2023

In this project I'll use Asynchronous Javascript to call an API and set the leaderboard of the best players.

Leaderboard Project In this project I'll use Asynchronous Javascript to call an API and set the leaderboard of the best players. The main goals of thi

Oct 17, 2022

Show npm package authors and maintainers of your dependencies and devDependencies.

your-deps-authors Show npm package authors and maintainers of your dependencies and devDependencies. Usage $ npx your-deps-authors ╔══════════════════

Sep 29, 2022

Cypress commands are asynchronous. It's a common pattern to use a then callback to get the value of a cypress command

cypress-thenify Rationale Cypress commands are asynchronous. It's a common pattern to use a then callback to get the value of a cypress command. Howev

Oct 2, 2022

A declarative way of doing asynchronous programing with Typescript.

Deasyncify A declarative way of doing asynchronous programing with Typescript. Overview Getting started Issues Installation Usage Methods watch watchA

Jun 19, 2022

Extract a JS/TS module and its dependencies into a new package

module-extractor Extract a module and its dependencies into a new package Usage import { extractModules } from 'module-extractor' const extraction =

Aug 9, 2022

Repo for tricking NPM into not hoisting your package. No dependencies and a warning if imported.

noist (Short for No Hoist) Repo for tricking NPM into not hoisting your package. No dependencies and a warning if imported. Why? As of npm@7 NPM suppo

Oct 27, 2022
Releases(v1.0.0)
  • v1.0.0(Aug 29, 2021)

    A small fetching package for super simple usages. Built using zero dependencies to be lightweight and asynchronous. Lightfetch gives you the best of size, speed, and usability.

    Source code(tar.gz)
    Source code(zip)
Owner
Ray Arayilakath
Hiya! I do Fullstack Web Development and Hobby Coding! Extremely fond of creativity, cute animals, and Birthday Cake Ice Cream. Pronouns: he/him/his.
Ray Arayilakath
Lightweight (zero dependencies) library for enabling cross document web messaging on top of the MessageChannel API.

Lightweight (zero dependencies) library for enabling cross document web messaging on top of the MessageChannel API.

LironH 4 Jul 15, 2022
A set of APIs for handling HTTP and HTTPS requests with Deno 🐿️ 🦕

oak commons A set of APIs that are common to HTTP/HTTPS servers. HTTP Methods (/method.ts) A set of APIs for dealing with HTTP methods. Content Negoti

oak 7 May 23, 2022
The Remix version of the fakebooks app demonstrated on https://remix.run. Check out the CRA version: https://github.com/kentcdodds/fakebooks-cra

Remix Fakebooks App This is a (very) simple implementation of the fakebooks mock app demonstrated on remix.run. There is no database, but there is an

Kent C. Dodds 61 Dec 22, 2022
nest연습용 (w. https://github.com/seuiggi, https://github.com/okysky1121)

A progressive Node.js framework for building efficient and scalable server-side applications. Description Nest framework TypeScript starter repository

이름 2 Oct 5, 2022
LunaSec - Open Source Security Software built by Security Engineers. Scan your dependencies for Log4Shell, or add Data Tokenization to prevent data leaks. Try our live Tokenizer demo: https://app.lunasec.dev

Our Software We're a team of Security Engineers on a mission to make awesome Open Source Application Security tooling. It all lives in this repo. Here

LunaSec 1.2k Jan 7, 2023
Package fetcher is a bot messenger which gather npm packages by uploading either a json file (package.json) or a picture representing package.json. To continue...

package-fetcher Ce projet contient un boilerplate pour un bot messenger et l'executable Windows ngrok qui va permettre de créer un tunnel https pour c

AILI Fida Aliotti Christino 2 Mar 29, 2022
Zero Two Bot,A fully Modular Whatsapp Bot to do everything possible in WhatsApp by Team Zero Two

?? ???????? ?????? ???? ?? A Moduler WhatsApp Bot designed for both PM and Groups - To take your boring WhatsApp usage into a whole different level. T

Sam Pandey 69 Dec 25, 2022
Multiplies a number by zero. Useful for when you need to multiply a number by zero

multiply-by-zero Multiplies a number by zero. Useful for when you need to multiply a number by zero Please consider checking out the links of this pro

Dheirya Tyagi 2 Jul 3, 2022
A beautiful, responsive, highly customizable and accessible replacement for JavaScript's popup boxes. Zero dependencies.Alerts ,dialogs

AsgarAlert (v1) for JS Install <script defer src="/asgar-alert.js"></script> Examples The most basic message: asgar("Hello world!"); A message signali

Asgar Aliyev 5 Dec 20, 2022
👌A useful zero-dependencies, less than 434 Bytes (gzipped), pure JavaScript & CSS solution for drop an annoying pop-ups confirming the submission of form in your web apps.

Throw out pop-ups confirming the submission of form! A useful zero-dependencies, less than 434 Bytes (gzipped), pure JavaScript & CSS solution for dro

Vic Shóstak 35 Aug 24, 2022