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

Option to set Path Params #103

Closed
ramtg opened this issue Oct 23, 2017 · 6 comments
Closed

Option to set Path Params #103

ramtg opened this issue Oct 23, 2017 · 6 comments
Assignees
Labels

Comments

@ramtg
Copy link

ramtg commented Oct 23, 2017

It'd would be helpful to have an option to specify placeholders for path parameter names and a way to specify values for them through a map much like SetQueryParams.

@jeevatkm
Copy link
Member

@ramtg Did you mean this one?

URL:

/v1/users/{id}

Then user provides key-value pair via something like:

resty.SetPathParams(map[string]string{
  "id": "[email protected]",
})

Then URL becomes:

@jeevatkm jeevatkm self-assigned this Oct 23, 2017
@ramtg
Copy link
Author

ramtg commented Oct 23, 2017

@jeevatkm . Correct. It'd be nice if multiple path params could be supported anywhere in the URL.
(something along the lines of http://square.github.io/retrofit/ )

@jeevatkm
Copy link
Member

@ramtg I got the understanding of this feature. Will work on it. Thanks.

@ramtg
Copy link
Author

ramtg commented Oct 23, 2017

@jeevatkm Thank you!

@jeevatkm
Copy link
Member

@ramtg Path params feature have been implemented at branch
path-params - 110f66a and PR #117

Please give it a try and let me know, thanks.

@jeevatkm
Copy link
Member

Merged to edge 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants