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

tests/util: Adjust helper methods to work for JSON arrays too #10229

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Dec 17, 2024

The axum Json extractor expects a Content-Type: application/json header, but in our test utilities we currently only add that when we detect that the request body contains a JSON object. This PR adjusts the code to also work for JSON arrays.

(This is in preparation for the next PR that uses the Json extractor with a Vec 😉)

@Turbo87 Turbo87 added C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear A-backend ⚙️ labels Dec 17, 2024
@Turbo87 Turbo87 enabled auto-merge December 17, 2024 13:05
@Turbo87 Turbo87 merged commit f962796 into rust-lang:main Dec 17, 2024
8 checks passed
@Turbo87 Turbo87 deleted the json-array-tests branch December 17, 2024 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant