Golang: Make HTTP requests

A simple GET request can be made like this:

POST request:

If more control is needed, like specifying headers, cookies, etc:

Published by Moazzam

Moazzam is a software developer working in the big apple. He has over a decade of experience in development. While most of his work involves developing web applications, he does development for Android and Windows Mobile in his spare time.

Join the Conversation

3 Comments

  1. Awesome! Thank you so much for publishing your concise, well-explained code; as a beginner Go amateur programmer, sometimes the official Go language documentation is cryptic and lacks good examples…

  2. Thank you for your nice, self explanatory example. Just doing python and now want to learn Go from scratch…

Leave a comment

Your email address will not be published. Required fields are marked *