Skip to content

Instantly share code, notes, and snippets.

@nise-nabe
Created November 28, 2012 16:16
Show Gist options
  • Save nise-nabe/4162279 to your computer and use it in GitHub Desktop.
Save nise-nabe/4162279 to your computer and use it in GitHub Desktop.
package main
import (
"crypto/tls"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
http.DefaultClient = &http.Client{Transport: &http.Transport{TLSClientConfig: &tls.Config{InsecureSkipVerify: true}}}
res, _ := http.Get("https://spoj.pl")
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment