Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.md update api readmes Dec 27, 2018
rest.go protoc-gen-micro was updated Apr 25, 2018

README.md

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"
}