curl

command
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

github.com/superfly/tokenizer/cmd/curl

This is an example client for making requests against a tokenizer server.

Assuming you've followed the instructions for starting a test server in github.com/superfly/tokenizer/cmd/tokenizer, you can send a test request like so:

# load example PROXY_URL and SEAL_KEY environment variables
source ./.envrc

# use $SEAL_KEY to encrypt the secret "trustno1".
# Stores the sealed secret in $SEALED_SECRET and auth token in $AUTH_TOKEN
eval $(go run . gen trustno1)

# send the secret in a request to https://httpbin.org/get
go run . http://httpbin.org/get

# output:
#    {
#    "args": {},
#    "headers": {
#        "Accept-Encoding": "gzip",
#        "Authorization": "Bearer trustno1",
#        "Host": "httpbin.org",
#        "User-Agent": "Go-http-client/1.1",
#        "X-Amzn-Trace-Id": "Root=1-64a81969-74f0804e26d8ebca31735213"
#    },
#    "origin": "97.118.205.196",
#    "url": "https://httpbin.org/get"
#    }

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