I have to code a client for a legacy HTTP API that is maintaining the state on the server by using session cookies.
I hoped for a simple solution like
const http = require('http');
http.request(options, callback);
but it appears that the built-in http module does not provide a built-in cookie state management. There are many posts here at stackoverflow where it is suggested to use require module with cookie jar, but the module's site says that this module is now officially deprecated.
I am not too enthusiastic about coding all that set-cookie response header parsing and providing a valid cookie header in requests. There surely must exist some library that allows to handle this cookie maintenance with ease. What would be the go-to module now that request is no longer the one?