Getting ready…

Run http-rest-get.go, which we created in one of our previous recipes, in a separate terminal, executing the following command:

$ go run http-rest-get.go
See the Creating your first HTTP GET method recipe.

Verify whether the /employees service is running locally on port 8080 by executing the following command:

$ curl -X GET http://localhost:8080/employees

This should return the following response:

[{"id":"1","firstName":"Foo","lastName":"Bar"},{"id":"2","firstName":"Baz","lastName":"Qux"}]
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.66.156