Skip to content

HTTP requests

An HTTP request in Codestamp has a method, a URL, query parameters, headers and a body. You edit it in a card in the collection, and Codestamp sends it from its Rust core.

  • Query parameters and headers are tables of rows. Each row has a key, a value and an on/off switch, and values accept {{variable}}. See Variables.
  • Path variables use :name in the path, for example /users/:id. A table under the Params tab follows the URL. Its values accept {{variable}} and are percent-encoded when Codestamp sends the request. Codestamp rejects an empty value and shows a message.
  • Auth has a tab of its own. See Auth.
Mode What it sends
None No body
JSON and Text The text you type, in an editor with highlighting
XML and HTML The text you type, with highlighting, Beautify, and a message such as “Line 3, column 7” when the XML is broken
URL-encoded A table of rows
Form data A table of text and file rows, sent as multipart/form-data
Binary One file, sent as it is as application/octet-stream

Codestamp fills in the Content-Type for each mode. A Content-Type you type yourself wins, except for form data, where Codestamp replaces a typed multipart/form-data with one that has a boundary and rejects any other value with a message.

Files in form data and binary bodies come only from the system file dialog on your computer. Codestamp streams them from disk when it sends, up to 100 MB in total, and its Rust core refuses any other path. Imports and exports never carry a full file path.

The response sits in the same card, below or beside the request. JSON, XML and HTML are formatted and highlighted, and the Headers, Cookies, Tests and Console tabs show the rest. Save body writes the body to a file exactly as it arrived, up to 32 MB per response.

Codestamp follows a redirect only to the same host and port, or from http to https on the same host. A redirect to another host comes back as the 3xx response, so your Authorization and Cookie headers do not travel to a host you did not choose.

Codestamp keeps cookies that responses set and sends them back to matching hosts under the RFC 6265 rules. A Cookie header you type yourself wins. Cookies are stored encrypted, up to 1,000, and the Cookies page lists them by domain.

Each request that goes out, including one that fails to connect, is recorded in the collection’s History. Codestamp stores the request as you typed it, with {{token}} instead of the secret’s value, so secrets never reach History. You can search History, filter it by status, reopen a request, or save it to the collection.

The </> button on a card turns the request into code in 15 languages and tools: cURL, HTTPie, PowerShell, JavaScript fetch and axios, Python, PHP, Go, Java, Kotlin, C#, Dart, Swift, Ruby and Rust. Two dropdowns pick the language and how values are written:

  • Environment variables, the default, reads each {{name}} from an environment variable called NAME.
  • As written leaves {{variable}} as it is.
  • Filled in (shows secrets) writes the values exactly as Codestamp would send them.

Pre-request scripts do not run for Copy as code. The Values dropdown starts on Environment variables every time, so a secret does not appear unless you ask for it.

  • Focus mode hides the sidebar and the other cards and shows the request and response side by side. The Hide secrets on screen option, on by default, masks values such as Authorization, Cookie, tokens, api_key and password.
  • Capture makes a PNG of the request and response. You choose what it includes, the light or dark theme, and whether secrets are masked. Codestamp draws the image on your computer and uploads nothing.
  • Save as example stores a response for the mock server.
  • Duplicate puts a copy directly below the request and opens it.