util/cnp-req

cnp-req is a simple command-line utility for making CNP requests over TCP.

Installation

cnp-req requires Go 1.8 or later.

Install it with:

go install contnet.org/util/cnp-req@latest

Usage

cnp-req [OPTIONS] [URL] [PARAM=VALUE...]

URL can be either a cnp:// URL or a CNP request intent.

Options:
  -B BODY  set request body to BODY
  -I       only print the response header without the body
  -b       read body data from stdin
  -i       print the response header
  -r       treat parameters as raw CNP-encoded parameters
  -v       print the request header and body

Source

The cnp-fmt source code is available on https://git.clsr.net/contnet/cnp-req