Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curl -k parameter #27

Closed
plutoid opened this issue Aug 14, 2018 · 0 comments
Closed

curl -k parameter #27

plutoid opened this issue Aug 14, 2018 · 0 comments

Comments

@plutoid
Copy link

plutoid commented Aug 14, 2018

hi,

thanks for your work!
when I try this I need curl one self-signed https web, my curl command need -k to ignore security check , after some digging,I add some code , then golang code works, kindly consider this.

same discussion on https://stackoverflow.com/questions/12122159/golang-how-to-do-a-https-request-with-bad-certificate

code like

tr := &http.Transport{
        TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
    }
    client := &http.Client{Transport: tr}
    _, err := client.Get("https://golang.org/")

regards, hua

mholt added a commit that referenced this issue Apr 12, 2019
@mholt mholt closed this as completed Apr 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants