httpfly

module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2026 License: MIT

README

httpfly

A CLI HTTP client that runs .http files (REST Client / IntelliJ HTTP file syntax): plain-text request definitions with variables, environments, proxy support, Lua pre-/post-request scripting, and converting to/from a bash-style curl command.

httpfly run doc/examples/1_basic.http

Documentation

Status

Parsing, validation, {{variable}} interpolation, sending requests, environments, proxying, Lua pre-/post-request scripting, and converting both ways between .http and a bash-style curl command all work.

Development

make check runs fmt, vet, and the test suite. make httpbin-up/ httpbin-down start and stop a local httpbin container that the examples under doc/examples/ use, so trying them doesn't require network access. See the Makefile for the full list of targets.

Directories

Path Synopsis
cmd
httpfly command
internal
cli
Package cli wires httpfly's command-line arguments to its subcommands.
Package cli wires httpfly's command-line arguments to its subcommands.
client
Package client sends httpfile.Request values over HTTP.
Package client sends httpfile.Request values over HTTP.
curl
Package curl converts a bash-style "curl ..." command (e.g.
Package curl converts a bash-style "curl ..." command (e.g.
env
Package env loads named variable sets from an httpfly.env.json file, so the same .http file can target different backends (dev, staging, prod, ...) without editing it -- select one with "-env <name>".
Package env loads named variable sets from an httpfly.env.json file, so the same .http file can target different backends (dev, staging, prod, ...) without editing it -- select one with "-env <name>".
httpfile
Package httpfile defines the domain types produced by parsing an .http file.
Package httpfile defines the domain types produced by parsing an .http file.
interpolate
Package interpolate substitutes "{{name}}" placeholders with variable values.
Package interpolate substitutes "{{name}}" placeholders with variable values.
parser
Package parser turns .http file content into httpfile.File values.
Package parser turns .http file content into httpfile.File values.
script
Package script runs a request's pre-/post-request Lua scripts, giving them a small object model (client.global, response) plus file-read and command-exec capabilities via github.com/vadv/gopher-lua-libs.
Package script runs a request's pre-/post-request Lua scripts, giving them a small object model (client.global, response) plus file-read and command-exec capabilities via github.com/vadv/gopher-lua-libs.
state
Package state persists variables scripts set via "client.global" across separate "httpfly run" invocations, so e.g.
Package state persists variables scripts set via "client.global" across separate "httpfly run" invocations, so e.g.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL