Skip to content
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

Merged
merged 2 commits into from
May 1, 2017

Conversation

alexmontecucco
Copy link
Contributor

Rewire set methods to actual url.Values' set methods for:

  • setFormData
  • setQueryParams
  • a few typo fix

 - setFormData
 - setQueryParams

 + a few typo fix
@codecov
Copy link

codecov bot commented May 1, 2017

Codecov Report

Merging #71 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master     #71   +/-   ##
======================================
  Coverage    96.8%   96.8%           
======================================
  Files          11      11           
  Lines         907     907           
======================================
  Hits          878     878           
  Misses         15      15           
  Partials       14      14
Impacted Files Coverage Δ
default.go 100% <ø> (ø) ⬆️
request.go 100% <100%> (ø) ⬆️
client.go 95.74% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d2d648a...14184e5. Read the comment docs.

@jeevatkm jeevatkm added this to the v0.12 Milestone milestone May 1, 2017
@jeevatkm
Copy link
Member

jeevatkm commented May 1, 2017

@alexmontecucco Thank you for the PR.

Copy link
Member

@jeevatkm jeevatkm left a 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)
Copy link
Member

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)

Copy link
Contributor Author

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)
Copy link
Member

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good, thanks.

@jeevatkm jeevatkm merged commit 2b803d0 into go-resty:master May 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants