Skip to content

Commit 5bcb3d3

Browse files
authored
Update client.go
1 parent af4b39e commit 5bcb3d3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

http/client.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func (c *HttpClient) Get(url string, headers http1.Header) ([]byte, error) {
6060
agent := request.Get(url)
6161

6262
if headers != nil {
63-
agent.Header = headers
63+
//agent.Header = headers
6464
}
6565

6666
_, body, errs := agent.
@@ -84,10 +84,10 @@ func (c *HttpClient) Post(url string, jsonData interface{}, headers http1.Header
8484
}
8585

8686
agent := request.Post(url)
87-
agent.Header.Set("Content-Type", "application/json")
87+
agent.Header.Add("Content-Type", "application/json")
8888

8989
if headers != nil {
90-
agent.Header = headers
90+
//agent.Header = headers
9191
}
9292

9393
_, body, errs := agent.
@@ -109,4 +109,4 @@ func (c *HttpClient) IsNetworkTimeout(err error) bool {
109109
}
110110

111111
return false
112-
}
112+
}

0 commit comments

Comments
 (0)