mirror of
https://github.com/tauri-apps/tauri-plugin-http.git
synced 2026-01-31 00:45:17 +01:00
fix(example): build on macOS (#557)
Committed via a GitHub action: https://github.com/tauri-apps/plugins-workspace/actions/runs/5861480510 Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
This commit is contained in:
committed by
tauri-bot
parent
06af7dd803
commit
806201c2f0
@@ -163,16 +163,15 @@ pub async fn fetch_send<R: Runtime>(
|
||||
})
|
||||
}
|
||||
|
||||
// TODO: change return value to tauri::ipc::Response on next alpha
|
||||
#[command]
|
||||
pub(crate) async fn fetch_read_body<R: Runtime>(
|
||||
app: AppHandle<R>,
|
||||
rid: RequestId,
|
||||
) -> crate::Result<Vec<u8>> {
|
||||
) -> crate::Result<tauri::ipc::Response> {
|
||||
let mut response_table = app.http().responses.lock().await;
|
||||
let res = response_table
|
||||
.remove(&rid)
|
||||
.ok_or(Error::InvalidRequestId(rid))?;
|
||||
|
||||
Ok(res.bytes().await?.to_vec())
|
||||
Ok(tauri::ipc::Response::new(res.bytes().await?.to_vec()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user