Skip to content

pardnchiu/go-rest-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note

This README was generated by Claude Code, get the ZH version from here.

cover

go-rest-client

pkg license

A terminal-based REST API testing tool compatible with VSCode REST Client extension's .http file format. Execute HTTP requests through an intuitive TUI interface and display responses in real-time.

Preview

┌─ API ─────────────────────┐┌─ Info ─────────────────────────────────────────┐
│ Get User Info             ││ GET https://api.github.com/users/pardnchiu     │
│ Send POST Request         ││ Accept: application/json                       │
│ SSE Stream                ││                                                │
│                           ││                                                │
│                           ││                                                │
│                           ││                                                │
│                           ││                                                │
│                           ││                                                │
│                           ││                                                │
│                           ││                                                │
└───────────────────────────┘└────────────────────────────────────────────────┘
 GET https://api.github.com/users/pardnchiu
┌─ API ─────────────────────┐┌─ Info ─────────────────────────────────────────┐
│ Get User Info             ││ 200 OK                                         │
│ Send POST Request         ││ Headers:                                       │
│ SSE Stream                ││   Content-Type: application/json; charset=utf-8│
│                           ││   X-RateLimit-Limit: 60                        │
│                           ││   Duration: 245.123ms                          │
│                           ││                                                │
│                           ││ Body:                                          │
│                           ││   {                                            │
│                           ││     "login": "pardnchiu",                      │
│                           ││     "id": 25631760,                            │
│                           ││     "type": "User"                             │
│                           ││   }                                            │
└───────────────────────────┘└────────────────────────────────────────────────┘
 (200) GET https://api.github.com/users/pardnchiu | 245.123ms

Table of Contents

Features

Feature Description
TUI Interface Split-panel interface built with tview (API list / response display)
VSCode Compatible Full support for .http file format
Real-time Response Display status codes, headers, response body, and request duration
SSE Support Real-time streaming display of Server-Sent Events data
File Monitoring Automatically detect file changes and reload requests
JSON Formatting Auto-format JSON responses for improved readability
Multiple Methods GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS
Keyboard Navigation Tab and arrow keys for quick view switching

Installation

Build from Source

git clone https://github.com/pardnchiu/go-rest-client.git
cd go-rest-client
go build -o gorc ./cmd/tui

Install to System Path

sudo cp gorc /usr/local/bin/gorc

Install via Go

go install github.com/pardnchiu/go-rest-client/cmd/tui@latest
sudo cp $(go env GOPATH)/bin/tui /usr/local/bin/gorc

Usage

1. Create Request File

### Get User Info
GET https://api.github.com/users/pardnchiu
Accept: application/json

###

### Send POST Request
POST https://httpbin.org/post
Content-Type: application/json

{
  "name": "test",
  "value": 123
}

###

2. Launch Application

gorc api.http

3. Keyboard Controls

Key Function
Navigate API list
Enter Execute selected request
Tab Switch between API list and response view
Arrow keys for quick view switching
Ctrl+C Esc Exit application

CLI Reference

gorc <file.http>

Supported HTTP Methods

Method Description
GET Retrieve resource
POST Create resource
PUT Update resource (full)
PATCH Update resource (partial)
DELETE Delete resource
HEAD Get headers only
OPTIONS Get supported methods

.http File Format

### Request Name
METHOD URL
Header-Name: Header-Value

{request body}

###
Syntax Description
### Request separator
### Name Define request name
// # Comments

License

MIT License

Author

邱敬幃 Pardn Chiu

Stars

Star


©️ 2026 邱敬幃 Pardn Chiu

About

TUI-based REST API tester with .http file compatibility

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages