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:

3 Replies to “Golang: Make HTTP requests”

  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 Reply

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