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

request-with-cookies

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

request-with-cookies

An enhancement to mikeal/request library to create reusuable clients that supports cookies per client

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
119
decreased by-28.31%
Maintainers
1
Weekly downloads
 
Created
Source

request-with-cookies

NPM

Build Status

An enhancement to mikeal/request library to create reusuable clients that supports cookies per client

Usage

Create a new client and use the same API as mikeal/request

var request = require("request-with-cookies");
var client = request.createClient();
client("http://www.google.com", function (error, response, body) {
  if (!error && response.statusCode == 200) {
    console.log(body) // Prints the google web page.
  }
});

Implementation details

createClient() is a one liner that uses request.defaults to create an instance of request with a new instance of cookie jar

module.exports.createClient = () -> request.defaults({jar: request.jar()})

Build and Test

The code can be built using gulp as follows

$ gulp 

Run tests using

$ npm test

Keywords

FAQs

Package last updated on 04 Jan 2014

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