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 on an EC2 instance, the HTTP server will start locally listening on port 80.  

Next, execute a GET request from the command line as:

$ curl -i -X GET http://ec2-172-31-34-99.compute-1.amazonaws.com:80/

This will give Hello World! as a response, which will give the following output:

HTTP/1.1 200 OKDate: Sat, 06 Jan 2018 10:59:38 GMTContent-Length: 12Content-Type: text/plain; charset=utf-8 Hello World!

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