Skip to content

HTTP and REST

The most common request type: anything that speaks HTTP, starting with REST APIs.

Right-click in the tree ▸ Add ▸ HTTP request.

An HTTP request tab with the URL, the Headers / Path parameters / Parameters / Body sections and the response panel on the right

GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS and QUERY.

The URL accepts {{variables}} anywhere — scheme, host, port, path, query string. The resolved value is shown under the field.

Three lists complete the URL:

  • query parameters (?key=value);
  • path parameters, which replace the path’s named segments;
  • headers.

Every row has an enable tickbox, a value type and a description.

Four families:

TypeUse
TextJSON, XML, plain text — with syntax highlighting and reformatting
FileSends the contents of a file from disk
Form (multipart/form-data)Named fields, with files
x-www-form-urlencodedNamed fields encoded in the body
  • Timeout: in milliseconds, specific to this request; failing that, the global value applies.
  • Follow redirects: enabled by default. Turn it off to observe the 3xx itself and its Location header.

Status, time, size, headers, and the body rendered according to its content type: collapsible JSON viewer, indented XML, image preview, plain text. The history tab gives you access to previous runs.

Attach an authentication route to the request so that the headers are injected and the token renewed automatically. See Authentication.

Restorm can also host an HTTP server, to test how a client consumes it — typically your application’s code, which you point at localhost for the duration of a test.

Add one with Add ▸ HTTP server: it listens on localhost:<port><path> for a method + path pair and replies with the status, headers and body you configure there. Other protocols are hosted the same way — see Server mode and Mocking an HTTP API.

Twenty-four languages and libraries are offered in the Code Snippets tab: cURL, JavaScript (Fetch, Axios), TypeScript, Python (Requests, http.client, aiohttp), native Node.js, Go, Rust (reqwest), Java (HttpClient, OkHttp), C# (HttpClient), PHP (cURL, Guzzle), Ruby (Net::HTTP, Faraday), Swift (URLSession), Kotlin (OkHttp), Dart, R (httr), PowerShell, Elixir (HTTPoison), Clojure (clj-http).

Do you have an OpenAPI specification, a Postman collection, a HAR file or just a curl command? File ▸ Import rebuilds the tree for you. See Import & export.