Socket
Socket
Sign inDemoInstall

httpify

Package Overview
Dependencies
55
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    httpify

Http in Node and Browserify, simply.


Version published
Weekly downloads
464
increased by32.19%
Maintainers
1
Install size
3.92 MB
Created
Weekly downloads
 

Readme

Source

httpify

Http in the browser and Node.js with no hassle.

The beauty of this module is that it handles all browserify configurations for which module to load for server or browser.

Install

npm install httpify --save

Usage

When using with Browserify, this module returns a shimmed version of the xhr module. When using with Node, it returns the raw request module.

var request = require('httpify')

var req = request({
  url: 'http://somewhere.com',
  method: 'GET',
  type: 'json'
}, function (err, response, body) {
  // Do stuff
})

See the documentation for xhr and request for a complete list of options.

TODO

  • add support for Angular
  • add more robust Browserify bundle/transform support

Keywords

FAQs

Last updated on 05 Nov 2015

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc