5 releases

0.0.5 Apr 2, 2024
0.0.4 Feb 6, 2024
0.0.3 Jan 6, 2024
0.0.2 Dec 23, 2023
0.0.1 Dec 23, 2023

#36 in HTTP client

Download history 6/week @ 2024-01-06 3/week @ 2024-02-03 2/week @ 2024-02-17 4/week @ 2024-02-24 12/week @ 2024-03-09 2/week @ 2024-03-16 153/week @ 2024-03-30 12/week @ 2024-04-06

176 downloads per month

MIT license



hitt is a command line HTTP testing tool focused on speed and simplicity.


hitt can be installed using Cargo.

cargo install hitt

If you do not have Cargo installed, you need to install it first.


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

The syntax of .http files is pretty straightforward:

GET https://mhouge.dk/

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.


Argument Description
--var <KEY>=<VALUE> Variables to pass to request
--recursive Run all files in directory
--fail-fast Exit on status code 4XX or 5xx
--hide-headers Hide response headers
--hide-body Hide 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:

GET https://mhouge.dk/

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.

POST https://mhouge.dk/

    "key": "value"

Multiple request in single file

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

GET https://mhouge.dk/


GET https://mhouge.dk/


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


hitt can be run directly from Neovim.

[!NOTE] The hitt executable must be available in your path for the plugin to work.



local hitt_plugin = {
    opts = {},


The plugin exposes a single command :HittSendRequest, which can be bound to a keymap like this:

-- ~/.config/nvim/after/plugin/hitt.lua

local hitt = require("hitt")

vim.keymap.set("n", "<leader>rr", hitt.HittSendRequest, {})

hitt neovim window


Name Default Description
window_width 80 Window width in percentage
window_height 80 Window height in percentage
fail_fast false Enables the --fail-fast options


hitt is most likely not ready for main stream usage. I (Mads Hougesen) am primarily developing it based on features I believe to be useful, or fun to develop.


~442K SLoC