Skip to content

Commit

Permalink
Param and QueryParam are map[string]interface{} now
Browse files Browse the repository at this point in the history
  • Loading branch information
imroc committed Oct 22, 2017
1 parent 9e6a984 commit 6483cb1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions req.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ func (h Header) Clone() Header {
}

// Param represents http request param
type Param map[string]string
type Param map[string]interface{}

// QueryParam is used to force append http request param to the uri
type QueryParam map[string]string
type QueryParam map[string]interface{}

// Host is used for set request's Host
type Host string
Expand Down Expand Up @@ -153,13 +153,13 @@ func (p *param) Copy(pp param) {
}
}
}
func (p *param) Adds(m map[string]string) {
func (p *param) Adds(m map[string]interface{}) {
if len(m) == 0 {
return
}
vs := p.getValues()
for k, v := range m {
vs.Add(k, v)
vs.Add(k, fmt.Sprint(v))
}
}

Expand Down

0 comments on commit 6483cb1

Please sign in to comment.