Version: v0.0.0-...-2897420 Latest Latest

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

Go to latest
Published: Sep 2, 2018 License: Apache-2.0 Imports: 6 Imported by: 0


Go Restful API Example

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

Getting Started

Run the Micro API
$ micro api --handler=http
Run the Greeter Service
$ go run greeter/server/main.go

### Run the Greeter API

$ go run go-restful.go
Listening on [::]:64738
Curl the API

Test the index

curl http://localhost:8080/greeter
  "message": "Hi, this is the Greeter API"

Test a resource

 curl http://localhost:8080/greeter/asim
  "msg": "Hello asim"


The Go Gopher

There is no documentation for this package.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL