XMLHttpRequest Cookie in context script

I’m trying to send a XMLHttpRequest() in my content script but it’s not passing the authentication cookie from my browser. I was able to pass the cookie from the mozilla cookie manager in main.js to my content script but I’m not sure how to add it to my request. Is there a way for me to set the cookie in my content script’s request or do I have to make the request from the main.js?

This is my little xhr wrapper, i use promise in it: https://github.com/Noitidart/AysncZip/blob/master/bootstrap.js#L515-L635

To make it use the browser cookies dont send the flag for Ci.nsIRequest.LOAD_ANONYMOUS

edit: oh wait you’re using sdk, hm probably i would say same, look out for if Ci.nsIRequest.LOAD_ANONYMOUS is getting sent