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

there is no way to use PathParams without escaping #663

Closed
SVilgelm opened this issue May 16, 2023 Discussed in #570 · 0 comments · Fixed by #664
Closed

there is no way to use PathParams without escaping #663

SVilgelm opened this issue May 16, 2023 Discussed in #570 · 0 comments · Fixed by #664

Comments

@SVilgelm
Copy link
Contributor

SVilgelm commented May 16, 2023

Discussed in #570

Originally posted by SVilgelm August 3, 2022
Hi, as it is said in the subject. I want to use the PathParams without escaping. Is there anyway to do that?

In our case the object Ids can include the / symbols, like foo/bar/xyz:

resty.New().R().SetPathParam("id", "foo/bar/xyz").Get("https://example.com/{id}")

the composed url will be https://example.com/foo%2Fbar%2Fxyz instead of https://example.com/foo/bar/xyz

As a solution i would like to propose an additional RawPathParams option on client and request levels

SVilgelm added a commit to SVilgelm/resty that referenced this issue May 16, 2023
Added `RawPathParams` options to `Client` and `Request` objects to support the path parameters with special characters, like `/`, without escaping.

Fix go-resty#663
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant