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

How it works…

Once we run the program, the HTTP server will start locally listening on port 8080

Next, browse to http://localhost:8080/greeter/say/hello?name=Arpit+Aggarwal as follows:

This will give you the response Hello followed by the name received as an HTTP request variable. Moreover, looking at the logs of the second-greeting-service.go will show us the request is served by the second greeting service, as follows:

Now, if we execute a GET request again then it will print the logs in the first-greeting-service.go console, which is  ...

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