[Rust] Update reqwest dependency to 0.13 with query and form features #22630
+5
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR updates the Rust client generator template to use reqwest 0.13 instead of 0.12 (closes #22621).
Caution
I have not tested this with a real generated client yet.
Changes
In reqwest 0.13, the
query()andform()methods have been moved behind feature flags and are disabled by default. Since the generated Rust clients extensively use both methods, these features must be explicitly enabled.Updates:
^0.12to^0.13"query"and"form"to reqwest feature flags for all variants.Why
queryfeature is neededThe generated API code in
api.mustacheextensively usesreq_builder.query()for handling query parameters. Without this feature flag, generated clients would fail to compile with reqwest 0.13.Why
formfeature is neededThe generated API code uses
req_builder.form()for URL-encoded form parameters. This feature is also required for compilation.Summary by cubic
Update the Rust client generator to use reqwest 0.13 and enable the query and form features so generated clients keep working with query params and URL-encoded forms. Closes #22621.
Written for commit 1ffe00a. Summary will update on new commits.