Commit 9d276064 authored by Administrator's avatar Administrator

Update client.go

parent 08372808
...@@ -200,7 +200,7 @@ func (c *client) Post(ctx *context.UlfsaarContext, url string, headers http.Head ...@@ -200,7 +200,7 @@ func (c *client) Post(ctx *context.UlfsaarContext, url string, headers http.Head
//url := c.options.Address + path //url := c.options.Address + path
startTime := time.Now() startTime := time.Now()
request := c.httpClient.R() request := c.httpClient.RemoveProxy().R()
request.SetBody(payload) request.SetBody(payload)
for h, val := range headers { for h, val := range headers {
...@@ -209,7 +209,7 @@ func (c *client) Post(ctx *context.UlfsaarContext, url string, headers http.Head ...@@ -209,7 +209,7 @@ func (c *client) Post(ctx *context.UlfsaarContext, url string, headers http.Head
if headers[ContentType] == nil { if headers[ContentType] == nil {
request.Header.Set(ContentType, ApplicationJSON) request.Header.Set(ContentType, ApplicationJSON)
} }
request.Header.Set(UserAgent, UserAgentValue) //request.Header.Set(UserAgent, UserAgentValue)
httpResp, httpErr := request.Post(url) httpResp, httpErr := request.Post(url)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment