Skip to content

Commit

Permalink
chore: add QueryParamAdd method in http client
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra committed Nov 28, 2024
1 parent 60736a2 commit df8e8d5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions http/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ func (r *Request) QueryParam(key, value string) *Request {
return r
}

// QueryParamAdd adds value to query param key
func (r *Request) QueryParamAdd(key, value string) *Request {
r.queryParams.Add(key, value)
return r
}

func (r *Request) Get(url string) (*Response, error) {
return r.Do(http.MethodGet, url)
}
Expand Down

0 comments on commit df8e8d5

Please sign in to comment.