Skip to content

Instantly share code, notes, and snippets.

View WinstonN's full-sized avatar

Winston Nolan WinstonN

  • Christchurch, New Zealand
View GitHub Profile
func connect() {
var url string = "http://domain.com/json"
client := &http.Client{}
req, err := http.NewRequest("GET", url, nil)
req.Header.Set("User-Agent", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)")
resp, err := client.Do(req)
if err != nil {
// handle error