I have a cookie.jr file generated from curl. I want to use that in node's request module.The closest example in the docs seems to look something like this:```const j = request.jar()request({url: 'http://www.google.com', jar: j}, function () {const cookie_string = j.getCookieString(url); // "key1=value1; key2=value2; ..."const cookies = j.getCookies(url);// [{key: 'key1', value: 'value1', domain: "www.google.com", ...}, ...]})```However this is not a working example and the documentation doesn't indicate one. How can I accomplish this?
Submitted April 18, 2019 at 07:37PM by quesurifn
No comments:
Post a Comment