New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

request-cookies

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

request-cookies

Cookie management for the node request libary

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11K
increased by1.74%
Maintainers
1
Weekly downloads
 
Created
Source

request-cookies Build Status

Cookie management for node's request library

see tests for examples

CookieJar

CookieJar()

Holds cookies

add(data, url, options)

Add a cookie to the cookie jar

Params:

  • String|Object data can be a Cookie, json object, or a set-cookie header string

  • String url

  • Object options [optional]

remove(url, key)

Remove a cookie by name for a given domain. If the key then all cookies for the given domain and path (if given) will be removed. Note: when cookies are added without a path specified the default path is "/" in accordance with http://tools.ietf.org/search/rfc6265#section-5.1.4 - so you should use that for the path param when appropriate.

Params:

  • String url

  • String key

getCookies(url, options)

Get cookies that match the given properties

Params:

  • String url

  • Object options [optional]

getCookieHeaderString(url, options)

Get HTTP Cookie header string

Params:

  • String url

  • Object options [optional]

toJSON()

Get cookie jar as a JSON object

Return:

  • Object

Cookie(data)

HTTP Cookie

Params:

  • String|Object data can be a cookie header string or a json object

getCookieHeaderString()

Get cookie as a cookie header string

Return:

  • String

set(data)

Set multiple cookie properties at once

Params:

  • String|Object data

toJSON()

Get cookie as a JSON object

Return:

  • Object

Keywords

FAQs

Package last updated on 28 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