-
Notifications
You must be signed in to change notification settings - Fork 718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewire set methods to actual url.Values' set methods #71
Conversation
- setFormData - setQueryParams + a few typo fix
Codecov Report
@@ Coverage Diff @@
## master #71 +/- ##
======================================
Coverage 96.8% 96.8%
======================================
Files 11 11
Lines 907 907
======================================
Hits 878 878
Misses 15 15
Partials 14 14
Continue to review full report at Codecov.
|
@alexmontecucco Thank you for the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for improving documentation as well.
Just one correction is required. Please have a look. Then we will merge it.
client.go
Outdated
@@ -236,13 +236,13 @@ func (c *Client) SetQueryParam(param, value string) *Client { | |||
// | |||
func (c *Client) SetQueryParams(params map[string]string) *Client { | |||
for p, v := range params { | |||
c.QueryParam.Add(p, v) | |||
c.QueryParam.Set(p, v) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we do, as same as Request
object method?
c.SetQueryParam(p, v)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, missed, will do
@@ -48,13 +48,13 @@ func (r *Request) SetHeader(header, value string) *Request { | |||
// | |||
func (r *Request) SetHeaders(headers map[string]string) *Request { | |||
for h, v := range headers { | |||
r.Header.Set(h, v) | |||
r.SetHeader(h, v) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good. Thanks.
@@ -79,13 +79,13 @@ func (r *Request) SetQueryParam(param, value string) *Request { | |||
// | |||
func (r *Request) SetQueryParams(params map[string]string) *Request { | |||
for p, v := range params { | |||
r.QueryParam.Add(p, v) | |||
r.SetQueryParam(p, v) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good, thanks.
Rewire set methods to actual url.Values' set methods for: