The following are a few examples of increasingly customizable HTTP/S clients. Please consult Go's http/net documentation.
You can download all examples as a zip file.
This example shows a high-level interface for issuing an HTTP GET request:
This example creates a Client to customize behavior, such as timeouts.
This example creates a Request by hand.
This example further customizes a client with Transport, which allows for configuration of TLS.
This example shows how to modify request headers and view response headers.