top
(README.md)
# 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=proxy api
```

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

Imports 6 package(s)

  1. github.com/micro/go-micro/client
  2. github.com/micro/go-web
  3. github.com/micro/micro/examples/greeter/server/proto/hello
  4. golang.org/x/net/context
  5. github.com/emicklei/go-restful
  6. github.com/golang/glog