# How to attach cookie to request?

**URL:** <https://discourse.mozilla.org/t/how-to-attach-cookie-to-request/148059>\
**Category:** Development\
**Created:** [April 20, 2026, 1:41pm UTC](https://discourse.mozilla.org/t/how-to-attach-cookie-to-request/148059 "2026-04-20T13:41:48Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Espen\_Klem](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/espen_klem/32/66827_2.png) [@Espen\_Klem](https://discourse.mozilla.org/u/Espen_Klem)\
**Post date:** [April 20, 2026, 8:45pm UTC](https://discourse.mozilla.org/t/how-to-attach-cookie-to-request/148059/2 "2026-04-20T20:45:00Z")

</div>

credentials used to work?

> [@Set cookie manually in fetch](https://discourse.mozilla.org/t/set-cookie-manually-in-fetch/50503):
>
> I need to fetch some page in my firefox extension scripts. The page to be fetched returns valid content only when where is a valid cookie passed. I can fetch the cookies using browser.cookies API, but failed to set the cookie in the fetch request. Desired is there a way (I didn’t found) to make fetch automatically read the API, or allow set cookie manually ?

---

_[View the full topic](https://discourse.mozilla.org/t/how-to-attach-cookie-to-request/148059)._
