newcomers ask for help. Now you use superagent on node to send a request to access several ports. You need to save the cookie obtained by the first request and let the later request continue to use. It just happens that there is a special agent () method in this library in the official document, but the example given in the official document is not very clear
.const agent = request.agent();
agent
.post("URL")
.then(() => {
return agent.get("/cookied-page");
});
try printing agent as if the results are all cookiejar objects? So I"d like to ask what this / cookied-page is. Now I want to save the cookie returned by the request in a global variable.