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.

ferris-idea drive screenshot · v1.6.0 release build, 2026-12-04Write a request
Section titled “Write a request”Create a file ending in .http (or .rest) anywhere in the project:
### List productsGET https://api.example.com/products?limit=10Accept: application/json
### Create a product# @name createProductPOST https://api.example.com/productsContent-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 byHTTP/1.1. A bare URL meansGET. 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: valuelines 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 anapplication/x-www-form-urlencodedbody 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.
Send a file as the body
Section titled “Send a file as the body”POST https://api.example.com/importContent-Type: application/json
< ./fixtures/products.jsonThe 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.
Settings per request
Section titled “Settings per request”# @no-redirect# @timeout 120GET https://api.example.com/slow-report# @no-redirectreturns the first response, even a 3xx.# @timeout Nwaits 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.
Send it
Section titled “Send it”- Put the caret in the request.
- 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.
Read the response
Section titled “Read the response”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.
What the client does for you
Section titled “What the client does for you”- Headers it adds unless you write them:
Host,Content-Length,Connection: close,User-Agent: FerrisIDEAandAccept-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,Cookieand a hand-writtenHostfor the rest of the chain;httpstohttpand 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.
What is not there
Section titled “What is not there”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.
When it does not work
Section titled “When it does not work”- “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
# @timeoutfor that request. - A redirect note instead of the page: the chain went to another origin, to
http, or past 5 steps.
| Action | Shortcut |
|---|---|
| Tools › HTTP Client › Send Request at Caret | ⌘↩CtrlEnter |
For agents
Section titled “For agents”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_cookiesForget the cookies this MCP server keeps betweensend_http_requestcalls; withglobals: truealso the globals response handler scripts set.http_cookiesCookies this MCP server keeps betweensend_http_requestcalls (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_requestsRequests of a.httpfile: name, line, method, URL, headers and body with variables resolved from the file, the environment ofhttp-client.env.json/http-client.private.env.jsonandenv, plus unresolved names,settings(# @no-redirect,# @timeout N),body_files(not read),noteson parts never sent, andscript: the response handler withstatusneeds approval(only a person approves it, in the window),approvedorrefused.send_http_requestSend one request of a.httpfile.
No tool matches. Try fewer words, or .