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

Add put_path_params_style/2 step #373

Merged
merged 5 commits into from
Jun 19, 2024

Conversation

whatyouhide
Copy link
Contributor

First attempt. Not sure I’m doing it right with the option + step, but it seems to work 🙃

lib/req/steps.ex Outdated
@@ -71,6 +72,7 @@ defmodule Req.Steps do
put_base_url: &Req.Steps.put_base_url/1,
auth: &Req.Steps.auth/1,
put_params: &Req.Steps.put_params/1,
put_path_params_style: &Req.Steps.put_path_params_style/1,
Copy link
Owner

Choose a reason for hiding this comment

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

could you merge this into the put_path_params step instead? It's going to be easier to document too, just another option for that step. Finally, I don't think we need to store it in req.private and instead look at req.options when applying params. I prefer to keep as least things as possible in req.private since it's user accessible. wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suresies, incoming

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@wojtekmach done!

test/req/steps_test.exs Outdated Show resolved Hide resolved
lib/req/steps.ex Outdated Show resolved Hide resolved
@wojtekmach wojtekmach merged commit 3d67b56 into wojtekmach:main Jun 19, 2024
2 checks passed
@wojtekmach
Copy link
Owner

Thank you!

@whatyouhide whatyouhide deleted the al/put-path-params-style branch June 19, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants