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:
Lucas Fernandes Nogueira
2023-08-14 22:56:29 +00:00
committed by tauri-bot
parent 06af7dd803
commit 806201c2f0

View File

@@ -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()))
}