You should be able to pass along cookies by setting it in the header of your request:
const opts = {
headers: {
cookie: 'accessToken=1234abc; userId=1234'
}
};
const result = await fetch(`/some/url`, opts);
More Related Contents:
- Error: require() of ES modules is not supported when importing node-fetch
- Error [ERR_REQUIRE_ESM]: require() of ES Module not supported [duplicate]
- What is the quickest way to subtract a variable from a number and set the variable?
- Node.js bug ? function’s return value change when stored as variable
- Removing nested promises
- Download a file from NodeJS Server using Express
- How can I use async/await at the top level?
- Javascript – get array of dates between 2 dates
- How can I mock an ES6 module import using Jest?
- React – changing an uncontrolled input
- What does npm install –legacy-peer-deps do exactly? When is it recommended / What’s a potential use case?
- How to pass variable from jade template file to a script file?
- Is it possible to pass a flag to Gulp to have it run tasks in different ways?
- Why {} + {} is NaN only on the client side? Why not in Node.js?
- Inject TypeORM repository into NestJS service for mock data testing
- How quickly can you atomically increment a value on the Firebase Realtime Database?
- Load and execute external js file in node.js with access to local variables?
- Please point out the misfacts in my learning regarding Asynchronous Javascript
- XMLHttpRequest module not defined/found
- How to use timezone offset in Nodejs?
- nodejs, multer, aws S3
- How do I get the domain originating the request in express.js?
- How do I add a custom script to my package.json file that runs a javascript file?
- How to call python script from NodeJs
- What is a TransientTransactionError in Mongoose (or MongoDB)?
- is there a mongoose connect error callback
- Can I use a Gulp task with multiple sources and multiple destinations?
- Heroku: “No default language could be detected for this app” error thrown for node app
- Firebase-Admin, importing it to react application throws Module not found error
- Can’t get rid of header X-Powered-By:Express