handler-routing

command
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2020 License: BSD-3-Clause Imports: 2 Imported by: 0

README

Handler Routing Gateway

Testing

Run:

go run main.go

Then open another terminal and run:

curl http://localhost:9096/pets/1

You should then see something like:

{"category":{"id":0,"name":"string"},"id":1,"name":"aspen","photoUrls":["string"],"status":"done","tags":[{"id":0,"name":"string"}]}

Now run:

curl http://localhost:9096/pets/8

You should see:

{"error":"id must be less than 8"}

Now run:

curl -H "Auth: 1337" http://localhost:9096/pets/8

You should now see something like:

{"category":{"id":0,"name":"string"},"id":8,"name":"aspen","photoUrls":["string"],"status":"done","tags":[{"id":0,"name":"string"}]}

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