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.

Browsing http://localhost:8080/read will display Hello in the browser, as you can see in the following screenshot:

Next, we will access http://localhost:8080/create, which will create a cookie with the name first-cookie and display the Cookie created message in the browser:

Now, subsequent access to http://localhost:8080/read will use first-cookie to display Hellofollowed by the value of first-cookie, as follows:

Let's understand the program ...

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