rest

command
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

README

REST API Implementation

Compile

go build || ./init build

How to Use

./rest

send a POST request using cURL

curl -X POST http://localhost:9001 \
	-H "Content-Type: application/json" \
	-d '{"plaintext": "test", "nrots": 1729, "seed": 42}'
curl -X POST http://localhost:9001 \
	-H "Content-Type: application/json" \
	-d '{"plaintext": "test", "nrots": 1729, "seed": 42, "algorithm": "md5"}'
curl -X POST http://localhost:9001 \
	-H "Content-Type: application/json" \
	-d '{"plaintext": "test", "nrots": 1729, "seed": 42, "algorithm": "md5", "uppercase": true}'
curl -X POST http://localhost:9001 \
	-H "Content-Type: application/json" \
	-d '{"plaintext": "test", "nrots": 1729, "seed": 42, "algorithm": "md5", "uppercase": true, "uppercasetimes": 3}'

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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