Basic HTTP cookie parser and serializer for HTTP servers. This is a Node.js module available through the npm registry. Installation is done using the npm install command. Parse an HTTP Cookie header string and return an object of all cookie name-value pairs. The str argument is the string representing a Cookie header value and options is an optional object containing additional parsing options. Specifies a function that will be used to decode a cookie's value. Since the value of a cookie has a limited character set (and must be a simple string), this function can be used to decode a previously-encoded cookie value into a JavaScript string or other object. The default function is the global decodeURIComponent, which will decode any URL-encoded sequences into their byte representations.

Features

  • Parse an HTTP Cookie header string and returning an object of all cookie name-value pairs
  • By default, no domain is set, and most clients will consider the cookie to apply to only the current domain
  • The default function is the global encodeURIComponent, which will encode a JavaScript string into UTF-8 byte sequences and then URL-encode any that fall outside of the cookie range
  • Node.js module available through the npm registry
  • Serialize a cookie name-value pair into a Set-Cookie header string
  • The name argument is the name for the cookie, the value argument is the value to set the cookie to

Project Samples

Project Activity

See All Activity >

Categories

HTTP Servers

License

MIT License

Follow cookie

cookie Web Site

You Might Also Like
Our Free Plans just got better! | Auth0 by Okta Icon
Our Free Plans just got better! | Auth0 by Okta

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your secuirty. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of cookie!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript HTTP Servers

Registered

2023-05-15