Skip to content

Commit

Permalink
update http to support new version
Browse files Browse the repository at this point in the history
  • Loading branch information
medcl committed Jan 17, 2020
1 parent 83cb760 commit 0eb3c01
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions http.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func Get(url string,auth *Auth,proxy string) (*http.Response, string, []error) {
}

request.Header["Content-Type"]= "application/json"
//request.Header.Set("Content-Type", "application/json")
request.Header.Set("Content-Type", "application/json")

if(len(proxy)>0){
request.Proxy(proxy)
Expand All @@ -66,7 +66,8 @@ func Post(url string,auth *Auth, body string,proxy string)(*http.Response, strin
request.SetBasicAuth(auth.User,auth.Pass)
}

request.Header["Content-Type"]="application/json"
request.Header.Set("Content-Type", "application/json")
//request.Header["Content-Type"]="application/json"

if(len(proxy)>0){
request.Proxy(proxy)
Expand Down

0 comments on commit 0eb3c01

Please sign in to comment.