From 56d40c78001669b2d4ec7cdcd284d428f062a02e Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Sat, 21 Feb 2026 06:07:27 +0700 Subject: [PATCH] replace reqwest with wreq in web --- Cargo.lock | 33 +------------------ crates/service/web/storyteller_web/Cargo.toml | 3 +- .../src/util/http_download_url_to_bytes.rs | 4 +-- .../src/util/http_download_url_to_tempfile.rs | 3 +- 4 files changed, 6 insertions(+), 37 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 344a2340d8..b8fa81223f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10334,37 +10334,6 @@ dependencies = [ "libc", ] -[[package]] -name = "seedance2-pro-job" -version = "0.0.1" -dependencies = [ - "actix-web", - "actix_helpers", - "anyhow", - "bootstrap", - "bucket_paths", - "cloud_storage", - "concurrency", - "config", - "easyenv", - "enums", - "errors", - "hashing", - "jobs_common", - "log", - "mysql_queries", - "reqwest 0.12.23", - "seedance2pro", - "serde", - "serde_derive", - "serde_json", - "server_environment", - "sqlx", - "tokens", - "tokio", - "workspace-build-acceleration", -] - [[package]] name = "seedance2pro" version = "0.0.1" @@ -11479,7 +11448,6 @@ dependencies = [ "redis_common", "redis_schema", "regex", - "reqwest 0.12.23", "resend-rs", "reusable_types", "rust-s3", @@ -11510,6 +11478,7 @@ dependencies = [ "utoipa-swagger-ui", "videos", "workspace-build-acceleration", + "wreq", "zip 0.6.6", ] diff --git a/crates/service/web/storyteller_web/Cargo.toml b/crates/service/web/storyteller_web/Cargo.toml index 032ae746ee..3ef1335ae8 100644 --- a/crates/service/web/storyteller_web/Cargo.toml +++ b/crates/service/web/storyteller_web/Cargo.toml @@ -112,7 +112,8 @@ language-tags = "0.3.2" # Parsing single tags richly # HTTP # TODO/NB: This is just for Twitch, but we might need it later. -reqwest.workspace = true +# reqwest.workspace = true +wreq.workspace = true # Email resend-rs = "0.21.0" diff --git a/crates/service/web/storyteller_web/src/util/http_download_url_to_bytes.rs b/crates/service/web/storyteller_web/src/util/http_download_url_to_bytes.rs index dc057b5489..ce0446db9f 100644 --- a/crates/service/web/storyteller_web/src/util/http_download_url_to_bytes.rs +++ b/crates/service/web/storyteller_web/src/util/http_download_url_to_bytes.rs @@ -1,13 +1,13 @@ use bytes::Bytes; use errors::AnyhowResult; -use reqwest::{Client, IntoUrl}; +use wreq::Client; const USER_AGENT: &str = "storyteller-web/1.0"; // TODO(bt, 2025-06-03): Don't load the entire file into memory! /// Downloads a (binary) file to memory. Good for images, etc. Not great for large files. -pub async fn http_download_url_to_bytes(url: U) -> AnyhowResult { +pub async fn http_download_url_to_bytes(url: &str) -> AnyhowResult { let client = Client::builder() .gzip(true) .build()?; diff --git a/crates/service/web/storyteller_web/src/util/http_download_url_to_tempfile.rs b/crates/service/web/storyteller_web/src/util/http_download_url_to_tempfile.rs index 3d3d470b57..50ad1d5323 100644 --- a/crates/service/web/storyteller_web/src/util/http_download_url_to_tempfile.rs +++ b/crates/service/web/storyteller_web/src/util/http_download_url_to_tempfile.rs @@ -1,13 +1,12 @@ use crate::util::http_download_url_to_bytes::http_download_url_to_bytes; use errors::AnyhowResult; -use reqwest::IntoUrl; use std::io::Write; use tempfile::NamedTempFile; const USER_AGENT: &str = "storyteller-web/1.0"; /// Downloads a (binary) file to a filesystem path. Good for images, etc. Not great for large files. -pub async fn http_download_url_to_tempfile(url: U, temp_file: &mut NamedTempFile) -> AnyhowResult<()> { +pub async fn http_download_url_to_tempfile(url: &str, temp_file: &mut NamedTempFile) -> AnyhowResult<()> { let bytes = http_download_url_to_bytes(url).await?; temp_file.write_all(&bytes)?; Ok(())