O'Reilly logo

Go Web Development Cookbook by Arpit Aggarwal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required