Cookies, proxy and certificates
This page shows how HTTP requests reach the network and how responses come back. The rules apply to HTTP requests. gRPC and WebSocket reuse parts of the TLS policy and say so on their own pages.
Cookies
Postguy keeps one cookie jar per workspace. It follows RFC 6265.
| Behaviour | Detail |
|---|---|
| Storage | .postguy/cookies.json inside the workspace. It survives restarts. It is rewritten after a request that stored a cookie. |
| Capture | Set-Cookie is stored from every hop of a redirect chain, not only the final response. |
| Sending | On each hop, jar cookies that match the URL are sent. A Cookie header you set yourself is added after them (jar cookies; your cookies). |
| Limits | 3,000 cookies in total and 180 per domain. At a cap, the oldest cookies are evicted. |
| Expiry | Max-Age=0 and a past Expires delete a cookie. Cookies with no expiry are session cookies. |
| Secure | Secure cookies need HTTPS both ways. |
| Host-only | A cookie with no Domain attribute is not sent to subdomains. |
Turning the jar off
- Globally:
Settings › General › Disable cookies("Do not send or store cookies for any request"). - Per request: the request's Settings tab,
Disable cookie jar.
Either switch stops sending and storing for that request. Your own Cookie header is then sent untouched.
The Cookies manager
Open it from the bottom bar or with the command Open cookies. It has:
- A list of every jar cookie with domain, name, value, path and flags (
SSecure,HHttpOnly,Thas an expiry). - Search, a delete button on each row, and
Clear all. - A
Script domain allowlist(anAllowfield and a list with remove buttons). The allowlist is stored in the jar file.
c.cookies-manager is partial). Missing: adding and editing a cookie by hand, and a template list.
The allowlist is edited and stored, but the pm.cookies lookup does not use it today. pm.cookies.get, has and toObject return the response's Set-Cookie values plus the cookies the jar would send for the request URL. pm.cookies is read-only. pm.cookies.jar() throws not supported yet.Known limits
- There is no public-suffix list. A
Domainattribute is refused when it equals the host itself, or when it has no dot and differs from the host. SameSiteis stored and shown. It is not enforced beyond the RFC 6265bis defaults.- The
__Host-and__Secure-prefixes are not enforced.
Headless
cookies_listcookies_set(a rawSet-Cookievalue for a URL)cookies_delete(domain,path,name)cookies_clear
Redirects
Postguy follows redirects with its own loop. It records every hop (url, status, location).
| Status | Behaviour |
|---|---|
| 303 | Becomes GET (HEAD stays HEAD). The body and its headers are dropped. |
| 301, 302 | A POST becomes GET unless Follow original HTTP method is on. Other methods are kept. |
| 307, 308 | Method and body are always kept. |
3xx without Location | Final. The response is shown as received. |
Rules that apply on every hop:
- Cross-host hop (scheme, host or port changed):
Authorizationis dropped unlessFollow Authorization header on cross-host redirectsis on.- The manual
Cookieheader is always dropped. - The body headers are always dropped:
Content-Length,Content-Type,Content-Encoding,Content-Language,Transfer-Encoding. - The jar adds back the cookies that match the new host.
Remove referer header on redirectremoves aRefereryou set.- More than
Maximum redirectshops fails withstopped after N redirects (maximum N). - Seeing the same method and URL twice fails with
redirect loop at <url> (N hops). - The hop list is kept for the Console.
- With
Automatically follow redirectsoff, the 3xx response is returned as is.
Per-request settings (Settings tab):
| Setting | Default |
|---|---|
Automatically follow redirects | on |
Follow original HTTP method | off |
Follow Authorization header on cross-host redirects | off |
Remove referer header on redirect | off |
Maximum redirects | 10 (range 0 to 100) |
The global Automatically follow redirects in Settings is combined with the request's. Redirects are followed only if both are on.
Proxy
Settings › Proxy has two modes.
| Mode | Behaviour |
|---|---|
| System proxy (default) | Reads HTTP_PROXY, HTTPS_PROXY, ALL_PROXY and NO_PROXY from the environment (lowercase names also work). HTTPS_PROXY is used for https:// URLs and HTTP_PROXY for http://. Each falls back to ALL_PROXY. |
| Custom proxy | A proxy you set up. It wins over the environment. |
Environment proxy URLs can be http://host:port, socks5://…, socks5h://… or a bare host:port (treated as HTTP). The default port is 8080 for HTTP proxies and 1080 for SOCKS. Credentials in the URL (user:pass@host) are used for proxy Basic auth.
Custom proxy fields:
| Field | Notes |
|---|---|
| Protocol | HTTP, SOCKS5 or SOCKS5h |
| Host, Port | Port defaults to 8080. An empty host means no proxy. |
| Username, Password | Optional proxy Basic auth. Never logged. |
| Apply to HTTP, Apply to HTTPS | Both on by default |
| Bypass list | Comma-separated hosts that skip the proxy |
How routing works:
- HTTP proxy. Plain
http://requests use absolute-form requests.https://requests use aCONNECTtunnel. - HTTP/2 limit. A plain-HTTP request through an HTTP proxy cannot use HTTP/2. Forcing HTTP/2 fails with
HTTP/2 cannot go through an HTTP proxy in absolute-form; choose HTTP/1.x or a SOCKS5 proxy. - SOCKS5 resolves the target host on your machine. SOCKS5h resolves it at the proxy.
- Bypass list (and
NO_PROXY):*disables proxying. An entry matches a host,host:port,.suffix,*.suffixor a glob with*. - Only
httpandhttpsURLs are proxied. - The Console logs the effective proxy for each request.
partial (c.proxy). Missing: discovery of the operating system's proxy settings (environment variables only today) and a per-request off switch. WebSocket connections do not use proxies at all.TLS and certificates
HTTPS checks server certificates against the operating system's trust store. Settings › Certificates adds to that:
| Field | Format |
|---|---|
| Custom CA bundle (PEM) | Added to the system roots for every request. A file with no certificates is an error. |
| Certificate chain (PEM) | The client certificate, followed by any intermediates. |
| Private key (PEM) | PKCS#8, PKCS#1 or SEC1. |
Set the certificate chain and the private key together. Setting only one fails with client certificate and key paths must both be set.
Not supported: PFX/PKCS#12 files, encrypted private keys, per-host certificates and stored passphrases. The settings screen says Encrypted keys and PFX files are not supported yet.
Turning verification off
Two switches control it:
Settings › General › SSL certificate verification(global).- The request's own
Enable SSL certificate verification.
For HTTP, verification is off if either switch is off. When the global switch is off, its row shows the warning Verification is off: responses are encrypted but unauthenticated.
The connection is still encrypted, but the server is not authenticated. Anyone on the path can impersonate it. Add the server's CA to the custom CA bundle instead.
Other protocols
- WebSocket: uses the request's own
verifySsl, the custom CA bundle and the client certificate. It does not use the global switch. - gRPC: uses the request's
TLScheckbox, the custom CA bundle and the client certificate. There is no verification-off mode.
HTTP version (global and per request: Auto, HTTP/1.x, HTTP/2) sets the protocols offered during TLS negotiation. Auto offers HTTP/2 and falls back to HTTP/1.1.
Compression
Postguy decodes responses automatically.
- Encodings:
gzip,deflate(zlib, with a raw-deflate fallback),br(Brotli) andzstd. - Chains such as
Content-Encoding: br, gzipare decoded in reverse order. - Postguy sends
Accept-Encoding: gzip, deflate, brunless you set the header yourself.
Two caps protect memory:
- Decoded size: 50 MiB by default (the
Max response sizesetting;0means unlimited). - Ratio: decoded size may not exceed 200 times the encoded size plus 64 KiB of headroom.
A response that breaks a cap, such as a compression bomb, fails with an error that names the cap. A body larger than Max response size fails with response body exceeds the N-byte cap. The response viewer shows the size breakdown (headers, encoded body and decoded body).
Timeouts and cancel
Request timeouthas a global value (Settings › General) and a per-request value (Request timeout (ms, 0 = none)).0means no timeout. The request's value wins when it is not0.- Connecting has its own limit of 30 seconds for each stage (TCP connect, proxy handshake, TLS handshake).
- A timeout or a cancel names the phase it stopped in. Any partial bytes are discarded.
- Cancel a running request with
Esc(commandCancel request). - Timings shown with a response: connect (DNS, TCP and TLS combined), wait (time to first byte), download and total.
Headless
request_send sends a saved request with the workspace settings. request_cancel cancels it. cookies_* manage the jar. See Automation tools.