Getting Started
This page covers installing go-rest-client and sending your first request.
Prerequisites
| Item | Requirement |
|---|---|
| Go | 1.25.1 or higher (declared in go.mod; only needed to build from source or go install) |
| Terminal | 256-color support; rendering is handled by tcell |
| Network | Access to the target APIs in your .http file |
Installation
From Source
git clone https://github.com/pardnchiu/go-rest-client.git
cd go-rest-client
go build -o gorc ./cmd/tui
sudo cp gorc /usr/local/bin/gorc
Using go install
go install github.com/pardnchiu/go-rest-client/cmd/tui@latest
sudo cp "$(go env GOPATH)/bin/tui" /usr/local/bin/gorc
go install names the binary tui after the package directory; copying it as gorc is only for convenience, and the rest of this site refers to it as gorc.
First Run
Create api.http:
### Get User Info
GET https://api.github.com/users/pardnchiu
Accept: application/json
###
Launch:
gorc api.http
The left pane lists "Get User Info" and the right pane previews the request line and headers. Press Enter to send; the right pane then shows the status, response headers, duration, and the formatted JSON body. Press Esc or Ctrl+C to exit.
Next Steps
- Write more requests: .http File Format
- Learn the keys: Keyboard Controls
- Edit while testing: Hot Reload