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

muhb

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

muhb

A simple set of functions for coding easy to read HTTP requests.

  • 0.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
668
increased by6.03%
Maintainers
1
Weekly downloads
 
Created
Source

MUHB

Muhb is a simple library for writing easy to read HTTP requet code.

It is recommended for writing test cases, and other unofficial purposes.

Muhb run over promises.

Obs.: Do not use it in production.

Method Signatures

  • GET, DELETE, HEAD and OPTIONS: method ( String url [, Object headers] )
  • POST, PUT and PATCH: method ( String url [, Object headers] [, String body] )

Usage

Getting NodeJS homepage:

const { get } = require('muhb');

var { status, headers, body } = await get('https://nodejs.org/en/');

Posting a random form:

const { post } = require('muhb');

var { status, headers, body } = await post('https://nodejs.org/en/', 'key=value&key=value');

Sending headers:

const { put } = require('muhb');

var { status, headers, body } = await put('https://nodejs.org/en/', { myHeader: 'example' }, 'key=value&key=value');

Having all available muhb methods:

const muhb = require('muhb');

muhb.get //=> [function]
muhb.post //=> [function]
muhb.patch //=> [function]
muhb.delete //=> [function]
muhb.put //=> [function]
muhb.head //=> [function]
muhb.options //=> [function]

Contributing

We will be delighted to receive your issues and MRs.

Keywords

FAQs

Package last updated on 11 Sep 2018

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