Skip to content

Commit

Permalink
support url.Values in request param
Browse files Browse the repository at this point in the history
  • Loading branch information
imroc committed Sep 24, 2018
1 parent b02e5d1 commit 293bdc8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions req.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@ func (r *Req) Do(method, rawurl string, vs ...interface{}) (resp *Resp, err erro
return nil, err
}
delayedFunc = append(delayedFunc, fn)
case url.Values:
p := param{vv}
if method == "GET" || method == "HEAD" {
queryParam.Copy(p)
} else {
formParam.Copy(p)
}
case Param:
if method == "GET" || method == "HEAD" {
queryParam.Adds(vv)
Expand Down

0 comments on commit 293bdc8

Please sign in to comment.