rest-client

module
v0.0.0-...-df6963b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2024 License: Apache-2.0

README

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

Directories

Path Synopsis
cmd
rc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL