https://github.com/no-src/rest-client
A http command line tool
https://github.com/no-src/rest-client
Last synced: 3 months ago
JSON representation
A http command line tool
- Host: GitHub
- URL: https://github.com/no-src/rest-client
- Owner: no-src
- License: apache-2.0
- Created: 2024-05-10T09:21:23.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-12-04T01:14:23.000Z (7 months ago)
- Last Synced: 2025-12-07T07:20:14.920Z (7 months ago)
- Language: Go
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rest-client
[](https://github.com/no-src/rest-client/actions)
[](https://github.com/no-src/rest-client/blob/main/LICENSE)
A command line tool for sending HTTP requests and displaying the response.
## Installation
The first need [Go](https://go.dev/doc/install) installed (**version 1.22+ is required**), then you can use the below
command to install `rest-client`.
```bash
go install github.com/no-src/rest-client/...@latest
```
## Quick Start
### Configuration
Create a `conf.yaml` file to define the custom variables, it is optional.
```yaml
host: http://127.0.0.1
secret: 123456
```
### Request
Create a `request.http` file to define the HTTP requests, it is required.
```text
### Test POST HTTP Request
POST {{host}}/say
Content-Type: application/json
{
"content": "hello",
"secret": "{{secret}}"
}
### Test GET HTTP Request
GET {{host}}/info
```
### Show Requests
```bash
rc -conf=conf.yaml -http=request.http
```
### Send Request
```bash
rc -conf=conf.yaml -http=request.http -run -id=1
```