How to Set Cookies in a HTTP Request

I was struggling trying to set cookies in the headers request using Fields. Setting the header ‘Name’ as “Cookie” and the cookie in the ‘Value’ field was not working.

The way that works was setting the cookies using JSON

  1. Set “Using JSON” when specifying headers:

  1. Paste your cookie like this:

  1. If you have more cookies to set, you can set like this:

!! additional spaces/tabs can cause errors, so you can copy this example below to prevent it:

→ with one cookie

{
  "Cookie": "cookie-keyname1=cookie-value1"
}

→ more than one cookie

{
  "Cookie": "cookie-keyname1=cookie-value1; cookie-keyname2=cookie-value2; cookie-keyname3=cookie-value3"
}

→ a lot of cookies would look like this:

4 Likes

Hi @bonekazz

Thanks for posting here and welcome to the community! :partying_face:
This is really handy! :raised_hands: