Skip to content

no-src/rest-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rest-client

Build License

A command line tool for sending HTTP requests and displaying the response.

Installation

The first need Go installed (version 1.22+ is required), then you can use the below command to install rest-client.

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.

host: http://127.0.0.1
secret: 123456

Request

Create a request.http file to define the HTTP requests, it is required.

### Test POST HTTP Request
POST {{host}}/say
Content-Type: application/json

{
  "content": "hello",
  "secret": "{{secret}}"
}

### Test GET HTTP Request
GET {{host}}/info

Show Requests

rc -conf=conf.yaml -http=request.http

Send Request

rc -conf=conf.yaml -http=request.http -run -id=1

Releases

No releases published

Packages

No packages published

Languages