New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

fancy-http

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fancy-http

fancy-http is a powerful package for making HTTP requests with less code and more manageable for developers

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

Fancy-http

"fancy-http" is a handy tool that'll help you to make different http requests with so less code. It is also made for more manageable for the developers. Currently it supports 4 http methods: GET, POST, PUT & DELETE

Install from npm

npm i fancy-http

Supported Methods

import fr from "fancy-http";
fr.get(url, headers); // headers is optional
fr.post(url, body, headers); // headers is optional
fr.put(url, body, headers); // headers is optional
fr.delete(url, headers); // headers is optional

Code example

import fr from "fancy-http";
const headers = { "Content-Type": "application/json"};
const response = await fr.get("http://www.example.com", headers);
console.log(response); // For successfull request you will see a FancyResponse object with three properties: data, status and statusText otherwise you'll recieve a FancyError object.

Thank You.. Hope you'll love it.

Keywords

fancy-http

FAQs

Package last updated on 19 Apr 2024

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