# How to carry cookies when a WebSocket connection

**URL:** <https://forums.creativeclouddeveloper.com/t/how-to-carry-cookies-when-a-websocket-connection/7648>\
**Category:** UXP Plugin API\
**Tags:** uxp\
**Created:** [March 8, 2024, 6:15am UTC](https://forums.creativeclouddeveloper.com/t/how-to-carry-cookies-when-a-websocket-connection/7648 "2024-03-08T06:15:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![duoduoxu](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@duoduoxu](https://forums.creativeclouddeveloper.com/u/duoduoxu)\
**Post date:** [March 8, 2024, 6:15am UTC](https://forums.creativeclouddeveloper.com/t/how-to-carry-cookies-when-a-websocket-connection/7648/1 "2024-03-08T06:15:47Z")

</div>

I would like to inquire about how to include cookies during the establishment of a WebSocket connection.

UXP to send requests. While HTTP requests can carry cookies, WebSocket requests cannot.

```auto
{
  connection: 'Upgrade',
  host: 'localhost:3000',
  origin: 'file://',
  'sec-websocket-key': 'XJAZunGxNa6hbf4RvpQAkg==',
  'sec-websocket-version': '13',
  upgrade: 'websocket',
  'user-agent': 'WebSocket++/0.8.2'
}

```
