|
|
@ -23,8 +23,6 @@ use crate::{
|
|
|
|
|
|
|
|
|
|
|
|
const HTTP_USER_AGENT: &str = concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION"),);
|
|
|
|
const HTTP_USER_AGENT: &str = concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION"),);
|
|
|
|
|
|
|
|
|
|
|
|
impl tauri::Resource for ReqwestResponse {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type CancelableResponseResult = Result<reqwest::Response>;
|
|
|
|
type CancelableResponseResult = Result<reqwest::Response>;
|
|
|
|
type CancelableResponseFuture =
|
|
|
|
type CancelableResponseFuture =
|
|
|
|
Pin<Box<dyn Future<Output = CancelableResponseResult> + Send + Sync>>;
|
|
|
|
Pin<Box<dyn Future<Output = CancelableResponseResult> + Send + Sync>>;
|
|
|
@ -414,9 +412,6 @@ pub async fn fetch_send<R: Runtime>(
|
|
|
|
));
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let mut resources_table = webview.resources_table();
|
|
|
|
|
|
|
|
let rid = resources_table.add(ReqwestResponse(res));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Ok(FetchResponse {
|
|
|
|
Ok(FetchResponse {
|
|
|
|
status: status.as_u16(),
|
|
|
|
status: status.as_u16(),
|
|
|
|
status_text: status.canonical_reason().unwrap_or_default().to_string(),
|
|
|
|
status_text: status.canonical_reason().unwrap_or_default().to_string(),
|
|
|
|