# Send cookie with other headers in SLIM 3

**URL:** <https://discourse.slimframework.com/t/send-cookie-with-other-headers-in-slim-3/4516>\
**Category:** Questions\
**Created:** [November 20, 2020, 2:40pm UTC](https://discourse.slimframework.com/t/send-cookie-with-other-headers-in-slim-3/4516 "2020-11-20T14:40:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AleksanderHauss](https://avatars.discourse-cdn.com/v4/letter/a/c6cbf5/32.png) [@AleksanderHauss](https://discourse.slimframework.com/u/AleksanderHauss)\
**Post date:** [November 20, 2020, 2:40pm UTC](https://discourse.slimframework.com/t/send-cookie-with-other-headers-in-slim-3/4516/1 "2020-11-20T14:40:41Z")

</div>

I have a some code  
$newResponse = $response-\>withStatus(200)  
-\>withHeader(‘location’, ‘/’);  
return FigResponseCookies::set($newResponse, SetCookie::create(‘cookie’)-\>withValue(‘cookie’)-\>withPath("/"))

It’s not working for me, cookie is clean after this code, can you help me?

---

<div class="post-metadata">

**Author:** ![raffster](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@raffster](https://discourse.slimframework.com/u/raffster)\
**Post date:** [December 13, 2020, 12:35am UTC](https://discourse.slimframework.com/t/send-cookie-with-other-headers-in-slim-3/4516/2 "2020-12-13T00:35:43Z")

</div>

The code in your example is correct and works responding with both location and set-cookie headers.

Please check your characters encoding. I had to adjust some characters like ‘ …
