Closed scorpioRED closed 1 year ago
Hey! Did you wrap fetch
like shown in the readme?
const nodeFetch = require('node-fetch')
const fetch = require('fetch-cookie')(nodeFetch)
If so the session should be shared between all the requests you're making.
You can try setting NODE_DEBUG=http
in your environment (e.g. NODE_DEBUG=http node your-script.js
or export NODE_DEBUG=http
in your shell session) to see the raw HTTP debug information which will include the HTTP headers. Then you can verify if the cookies returned by the login response were indeed forwarded in the next request.
If they're not, it might be a bug from fetch-cookie, but I'll need you to share the debug logs (obfuscating sensitive parts of the cookies obviously) to take a look.
Hi! I can't find any examples, maybe somebody can help me? I need to make a GET request to a login page, take a token from hidden input, then make a POS login request with a cookie from a previous request, then another request also should be with same session Something like that: