Accessing values of an authorization request.
Hello - I've just made an OAuth request from discord and stored it in a requests object as follows:
The request object, when printed to the console, looks like this:
I need to access the object stored in the following path:
request->[Symbol(headers)]->[Symbol(headers map)]->cookie
.
I managed to get console.log(request.headers)
to print out the following, but I can't figure out how to get into the headers map
object.
Any help would be much appreciated!3 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by staffI think the issue lies in what a 'Symbol' is but all I found was https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol
Which didn't help me all that much
Symbol - JavaScript | MDN
Symbol is a built-in object whose constructor returns a symbol primitive — also called a Symbol value or just a Symbol — that's guaranteed to be unique. Symbols are often used to add unique property keys to an object that won't collide with keys any other code might add to the object, and which are hidden from any mechanisms other code will typi...
Unknown User•15mo ago
Message Not Public
Sign In & Join Server To View