Note that there are some explanatory texts on larger screens.

plurals
  1. POLooking for a standalone library for handling HTTP cookies on a personal container in Javascript
    primarykey
    data
    text
    <p>Do you know if a Javascript library to handle cookies exists, that is mature and can work without a browser? In other words I only want the cookie logic that is included in the web browsers and HTTP clients and following the current standards, and the cookies are stored and retrieved from a private store.</p> <p>I think the library can only contain get/set methods. The set method set cookies that came from the "Set-Cookie" HTTP header and the get method returns a list of cookies to send in the "Cookie" header for a specific host (or domain). The get method would need to receive a host as a parameter too, since return an error or something if a host is specifying cookies for another domain. There are more details about cookies that can be nice to have.</p> <p>I saw questions like <a href="https://stackoverflow.com/questions/11316377/is-there-an-equivalent-to-the-apache-http-client-in-javascript">Is there an equivalent to the Apache HTTP Client in JavaScript?</a> but the answer works and sets the cookie within a browser and not in a specific container.</p> <p><strong>Note:</strong> I looked into <a href="https://github.com/jed/cookies/blob/master/lib/cookies.js" rel="nofollow noreferrer">https://github.com/jed/cookies/blob/master/lib/cookies.js</a> , it is the closer library that matches the question right now. The most important issue against it is that there is not a getter for a domain: imagine you want to return all cookies for the yahoo.com domain, this logic is not part of the library and it is one of the most important features for a cookie library to decide which cookies to send in an HTTP request.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload