rest

command
v0.0.0-...-bf4ab67 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

README

REST API

This is an example of how to serve REST behind the API using go-restful

Getting Started

Run Micro API
$ micro api --handler=http
Run Greeter Service
go run greeter/srv/main.go
Run Greeter API
go run rest.go
Curl API
curl http://localhost:8080/greeter

Output

{
  "message": "Hi, this is the Greeter API"
}

Test a resource

 curl http://localhost:8080/greeter/asim

Output

{
  "msg": "Hello asim"
}

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