To send a request create a file ending in .http.

The syntax of .http files is pretty straightforward:


The file can then be run using the following command:

hitt run PATH_TO_FILE

That is all that is need to send a request.


--var <KEY>=<VALUE>Variables to pass to request
--recursiveRun all files in directory
--fail-fastExit on status code 4XX or 5xx
--hide-headersHide response headers
--hide-bodyHide response body
--timeout <TIMEOUT_MS>Request timeout in ms

Request headers

Request headers can be added by writing key value pairs (KEY:VALUE) on a new line after the method and URL:


Leading spaces in the header value is ignored, so KEY: VALUE and KEY:VALUE will both have the value VALUE.

Request body

A body can be sent with the request by creating a blank line, followed by the desired body input.

Please note, hitt does not infer content type. That has to be written as a header.


    "key": "value"

Multiple request in single file

Multiple requests can be written in a single file by adding a line with ### as a separator:





hitt has support for request variables.

A variable can be set in a file using the following syntax @name = VALUE. Whitespace is ignored.

Variables are used by wrapping the name in curly brackets ({{ name }}).

@variable_name = localhost

GET {{ variable_name }}/api

In-file variables are not shared between other files.

Variable arguments

Variables can be passed to all requests using the --var <KEY>=<VALUE> argument:

# file.http

GET {{ host }}/api

The file can the be run:

hitt run --var host=localhost:5000 file.http

Server sent events (SSE)

A SSE listener can be started using the hitt sse command.

hitt sse