- 1 Export JSON from the browser
CookieMan JSON Array for the API host. Drop cookies you do not want on the request.
- 2 Convert to a Cookie header
Paste below. Copy the Header String output. For a Netscape jar, change the dropdown to Netscape and save
cookies.txt. - 3 Send with HTTPie
Pass
Cookie:...as a header, or use an HTTPie session that already stored cookies from a previous response.
HTTPie commands that consume the output
# header string from this page:
http GET https://api.example.com/v1/me \
"Cookie: session_id=abc123; theme=dark"
# persist Set-Cookie from the server into an HTTPie session
http --session=./api.json GET https://api.example.com/v1/login
What the Cookie header drops
| Kept in Header String | Dropped |
|---|---|
name=value pairs, semicolon-separated | domain, path, expiry, Secure, HttpOnly, SameSite, partitionKey |
That loss is why a header is the right artefact for one request and the wrong artefact for Chrome Import. For import, keep JSON Array.