Skip to content

Send HTTP requests

Requests live in plain text files next to your code, so they are versioned, reviewed and shared like code. Ferris IDEA sends them with its own HTTP/1.1 client and shows the response in the Services tool window. .http and .rest files, environments and the response view: Works.

The editor shows shop.http: a file variable @limit, a GET request with an Accept header and a {{$uuid}} variable, and a named POST request with @timeout, a JSON body and a response handler script; a green run mark sits in the gutter at each request line
A .http file with two requests in a throwaway demo project · ferris-idea drive screenshot · v1.6.0 release build, 2026-12-04

Create a file ending in .http (or .rest) anywhere in the project:

### List products
GET https://api.example.com/products?limit=10
Accept: application/json
### Create a product
# @name createProduct
POST https://api.example.com/products
Content-Type: application/json
{
"name": "Espresso cup",
"price_cents": 900
}
  • ### starts a request; text after it names the request. # @name … (or // @name …) names the request that follows as well.

  • The first line is METHOD URL, optionally followed by HTTP/1.1. A bare URL means GET. The methods are GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS, TRACE and CONNECT.

  • Lines that start with ? or & right after it continue the URL, so long query strings can be split:

    GET https://api.example.com/search
    ?q=cup
    &sort=price
  • Name: value lines up to the first empty line are headers; an indented line continues the header above it.

  • After the empty line comes the body, up to the next ###. In an application/x-www-form-urlencoded body the line breaks are removed, so you can write one field per line.

  • Lines starting with # or // are comments.

A URL without a scheme is sent over http://. Schemes other than http and https are refused, and a #fragment is never sent.

POST https://api.example.com/import
Content-Type: application/json
< ./fixtures/products.json

The path is relative to the .http file. It must stay inside the project (no absolute paths, no ~, no links that lead out), be a UTF-8 text file of at most 16 MiB, and may not be http-client.private.env.json or lie under .git/ or .ferris-idea/. Variables inside the file are not replaced. If the file is refused or missing, nothing is sent and the message names the path and the rule.

multipart/form-data bodies are sent with CRLF line ends; write the parts and boundaries by hand.

# @no-redirect
# @timeout 120
GET https://api.example.com/slow-report
  • # @no-redirect returns the first response, even a 3xx.
  • # @timeout N waits N seconds (1 to 600) for the connection and for each read; the default is 30. A value outside that range is reported and the default stays.
  1. Put the caret in the request.
  2. Press ⌘↩ (CtrlEnter), or click the ▶ mark in the gutter next to the request line. Tools › HTTP Client › Send Request at Caret does the same.

To send every request of the file in order, choose Run All Requests in File from the editor’s context menu or Tools › HTTP Client. A request that cannot be sent is named with its reason at its place, and the others still go.

An HTTP request run configuration sends one request or all requests of a file in a chosen environment and shows them in the Run tool window, with private values masked. HTTP request configurations from IntelliJ IDEA’s project files are taken over.

The Services tool window opens with the request in its header:

  • Output has one line per request, for example GET https://api.example.com/products → 200 OK · 84 ms · 1532 bytes, followed by any notes. An error status is a result, not a failure: “404 Not Found · client error” is not shown in red. Red means nothing came back: no connection, a timeout, a bad URL or a refused request.
  • Response shows the status line, the headers, an empty line and the body. JSON is pretty-printed; other text is shown as it arrived. A body that is not text is described by its size and type.

Only the latest response is kept, and responses are never written to a file. With Run All, the Response tab shows the last one; Output lists them all.

  • Headers it adds unless you write them: Host, Content-Length, Connection: close, User-Agent: FerrisIDEA and Accept-Encoding: gzip, deflate.
  • Compressed bodies (gzip, deflate) are decoded, up to 16 MiB and at most 100 times the size received; a note gives both sizes. Brotli and zstd bodies are shown undecoded.
  • Redirects (301, 302, 303, 307, 308) are followed up to 5 times. A redirect to another origin drops Authorization, Cookie and a hand-written Host for the rest of the chain; https to http and other schemes are never followed. Each of these leaves a note.
  • Cookies set by responses are kept in memory, never in a file, by the rules of RFC 6265 (at most 4096 bytes each, 50 per domain, 3000 in all) and sent with later requests to the same site. Tools › HTTP Client › Clear HTTP Cookies forgets them.
  • TLS uses your system’s TLS library and trusted certificates.
  • Before anything is sent, the method, URL and headers are checked: a header value with a line break, or white space in the URL, is refused, so a variable can never inject a header or a second request.

No HTTP/2, no proxy settings, no client certificates or option to accept untrusted certificates, no authentication helpers, no request history, no saving or comparing responses (>> file and <> file lines are recognized and reported as not supported), no pre-request scripts, and no import from or export to cURL.

  • “No request in this file”: the file has no request line yet.
  • “Not sent: choose an HTTP environment: local, staging”: the request uses a variable from an environment and the file has several. Choose one: Environments and variables.
  • Unresolved names are listed and nothing is sent: a {{name}} has no value in the file, the environment or the script globals.
  • “timed out”: raise # @timeout for that request.
  • A redirect note instead of the page: the chain went to another origin, to http, or past 5 steps.
Keyboard of
ActionShortcut
Tools › HTTP Client › Send Request at Caret⌘↩CtrlEnter

http_requests lists a file’s requests with variables resolved and needs no right. send_http_request is a preview by default: it returns the request as it would be sent, with private values masked. Sending needs the right http. The answer carries status, headers, the body up to 256 KiB, redirects and notes, marked as untrusted text; the log line holds neither headers nor body.

  • clear_http_cookieschangeshttpForget the cookies this MCP server keeps between send_http_request calls; with globals: true also the globals response handler scripts set.
  • http_cookiesreadsCookies this MCP server keeps between send_http_request calls (in memory only, per origin by RFC 6265, never in a file, gone when the server stops): name, domain, path, secure, http_only, expiry — never the value.
  • http_requestsreadsRequests of a .http file: name, line, method, URL, headers and body with variables resolved from the file, the environment of http-client.env.json/http-client.private.env.json and env, plus unresolved names, settings (# @no-redirect, # @timeout N), body_files (not read), notes on parts never sent, and script: the response handler with status needs approval (only a person approves it, in the window), approved or refused.
  • send_http_requestchangesdry run by defaulthttpSend one request of a .http file.