Once we run the program, the HTTP server will start locally listening on port 8090.
Next, executing a GET request to the REST client from the command line as follows will give you a list of all the employees from the service:
$ curl -X GET http://localhost:8090/employees [{"id":"1","firstName":"Foo","lastName":"Bar"},{"id":"2","firstName":"Baz","lastName":"Qux"}]
Similarly, run http-rest-post.go, which we created in one of our previous recipes, in a separate terminal by executing the following command:
$ go run http-rest-post.go
Execute a POST request to the REST client from the command line, as follows:
$ curl -H "Content-Type: application/json" -X POST -d '{"Id":"3", "firstName":"Quux", "lastName":"Corge"}' http://localhost:8090/employee/add ...