回答編集履歴

2

RequestURI を空に

2017/07/02 15:43

投稿

mattn
mattn

スコア5030

test CHANGED
@@ -56,6 +56,8 @@
56
56
 
57
57
  }}
58
58
 
59
+ r.RequestURI = ""
60
+
59
61
  resp, _ := client.Do(r)
60
62
 
61
63
  return r, resp

1

オレオレ証明に対応

2017/07/02 15:43

投稿

mattn
mattn

スコア5030

test CHANGED
@@ -13,6 +13,8 @@
13
13
 
14
14
 
15
15
  import (
16
+
17
+ "crypto/tls"
16
18
 
17
19
  "log"
18
20
 
@@ -46,7 +48,15 @@
46
48
 
47
49
  r.URL.Scheme = "https"
48
50
 
51
+ client := http.Client{Transport: &http.Transport{
52
+
53
+ TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
54
+
55
+ Proxy: http.ProxyFromEnvironment,
56
+
57
+ }}
58
+
49
- resp, _ := http.DefaultClient.Do(r)
59
+ resp, _ := client.Do(r)
50
60
 
51
61
  return r, resp
52
62