MCPcopy
hub / github.com/qustavo/httplab

github.com/qustavo/httplab @v0.4.2 sqlite

repository ↗ · DeepWiki ↗ · release v0.4.2 ↗
129 symbols 384 edges 11 files 49 documented · 38%
README

HTTPLAB

Build Status Go Report Card PRs Welcome

The interactive web server.

HTTPLabs let you inspect HTTP requests and forge responses.


screencast

Install

Golang

go get github.com/gchaincl/httplab
go install github.com/gchaincl/httplab/cmd/httplab

Archlinux

yaourt httplab

~Snap~ FIXME

On systems where snap is supported:

snap install httplab

Binary distribution

Each release provides pre-built binaries for different architectures, you can download them here: https://github.com/gchaincl/httplab/releases/latest

Help

Usage of httplab:
  -a, --auto-update       Auto-updates response when fields change. (default true)
  -b, --body string       Specifies the inital response body. (default "Hello, World")
  -c, --config string     Specifies custom config path.
      --cors              Enable CORS.
      --cors-display      Display CORS requests. (default true)
  -d, --delay int         Specifies the initial response delay in ms.
  -H, --headers strings   Specifies the initial response headers. (default [X-Server:HTTPLab])
  -p, --port int          Specifies the port where HTTPLab will bind to. (default 10080)
  -s, --status string     Specifies the initial response status. (default "200")
  -v, --version           Prints current version.

Key Bindings

Key Description
Tab Next Input
Shift+Tab Previous Input
Ctrl+a Apply Response changes
Ctrl+r Resets Request history
Ctrl+s Save Response as
Ctrl+f Save Request as
Ctrl+l Toggle Responses list
Ctrl+t Toggle Response builder
Ctrl+o Open Body file
Ctrl+b Switch Body mode
Ctrl+h Toggle Help
Ctrl+w Toggle line wrapping
q Close popup
PgUp Previous Request
PgDown Next Request
Ctrl+c Quit

HTTPLab uses file to store pre-built responses, it will look for a file called .httplab on the current directory if not found it will fallback to $HOME. A sample file can be found here.

HTTPLab is heavily inspired by wuzz

Extension points exported contracts — how you extend this code

ActionFn (FuncType)
ActionFn is binded to a key combination
ui/bindings.go

Core symbols most depended-on inside this repo

Next
called by 20
ui/split.go
Info
called by 16
ui/ui.go
Get
called by 13
ui/ui.go
closePopup
called by 11
ui/ui.go
Index
called by 10
response.go
Get
called by 9
response.go
Cur
called by 8
response.go
Set
called by 8
ui/ui.go

Shape

Method 64
Function 50
Struct 10
TypeAlias 4
FuncType 1

Languages

Go100%

Modules by API surface

ui/ui.go41 symbols
response.go29 symbols
ui/bindings.go19 symbols
cmd/httplab/main.go8 symbols
ui/editor.go7 symbols
ui/split.go6 symbols
response_test.go6 symbols
dump.go6 symbols
ui/ui_test.go3 symbols
dump_test.go3 symbols
ui/split_test.go1 symbols

Dependencies from manifests, versioned

github.com/davecgh/go-spewv1.1.1 · 1×
github.com/jroimartin/gocuiv0.5.0 · 1×
github.com/mattn/go-runewidthv0.0.14 · 1×
github.com/nsf/termbox-gov1.1.1 · 1×
github.com/pmezard/go-difflibv1.0.0 · 1×
github.com/rivo/unisegv0.4.4 · 1×
github.com/rs/corsv0.0.0-2017052916075 · 1×
github.com/spf13/pflagv0.0.0-2017090112085 · 1×
github.com/stretchr/testifyv0.0.0-2017013011314 · 1×

For agents

$ claude mcp add httplab \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact