Hi everyone,
Recently, I want to use gopherjs to transfer my go code to js, but I got a problem of https post request.
In golang, first I wrote this:
func test() {
...
tr := &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
}
client := &http.Client{Transport: tr}
_, err := client.Post("https://golang.org/", "", reader)
if err != nil {
fmt.Println(err)
} ...
}
After transferred to js code, I got "Uncaught Error: network access is not supported by GopherJS". I think the problem is that I use the customized http client, and gopherjs not implemented this(I guess...)
Then I try to use the default client:
There is no more that uncaught error but a "net::ERR_INSECURE_RESPONE" which is not superseded.
My question is, is there a way to do a https post without insecure verification with gopherjs?
Thanks.
Best
wj