diff --git a/crates/uv-publish/Cargo.toml b/crates/uv-publish/Cargo.toml index 0317a4685606a..d1fa65253e3ac 100644 --- a/crates/uv-publish/Cargo.toml +++ b/crates/uv-publish/Cargo.toml @@ -36,7 +36,7 @@ futures = { workspace = true } glob = { workspace = true } itertools = { workspace = true } reqwest = { workspace = true } -reqwest-middleware = { workspace = true } +reqwest-middleware = { workspace = true, features = ["json"] } reqwest-retry = { workspace = true } rustc-hash = { workspace = true } serde = { workspace = true, features = ["derive"] } diff --git a/crates/uv-publish/src/trusted_publishing/pypi.rs b/crates/uv-publish/src/trusted_publishing/pypi.rs index 54d3e6d737054..5d1644211ddab 100644 --- a/crates/uv-publish/src/trusted_publishing/pypi.rs +++ b/crates/uv-publish/src/trusted_publishing/pypi.rs @@ -83,7 +83,7 @@ impl TrustedPublishingService for PyPIPublishingService<'_> { let response = self .client .post(Url::from(mint_token_url.clone())) - .body(serde_json::to_vec(&mint_token_payload)?) + .json(&mint_token_payload) .send() .await .map_err(|err| { diff --git a/crates/uv-publish/src/trusted_publishing/pyx.rs b/crates/uv-publish/src/trusted_publishing/pyx.rs index 60fdba92cf308..5670272ef0ee6 100644 --- a/crates/uv-publish/src/trusted_publishing/pyx.rs +++ b/crates/uv-publish/src/trusted_publishing/pyx.rs @@ -109,7 +109,7 @@ impl TrustedPublishingService for PyxPublishingService<'_> { let response = self .client .post(Url::from(mint_token_url.clone())) - .body(serde_json::to_vec(&mint_token_payload)?) + .json(&mint_token_payload) .send() .await .map_err(|err| {