mirror of https://github.com/tauri-apps/tauri
fix(core): request body on dev proxy for mobile
This commit is contained in:
parent
ce864cebfd
commit
418db7109a
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"tauri": patch:enhance
|
||||
---
|
||||
|
||||
Propagate request body on dev server mobile proxy.
|
|
@ -115,7 +115,7 @@ fn get_response<R: Runtime>(
|
|||
for (name, value) in request.headers() {
|
||||
proxy_builder = proxy_builder.header(name, value);
|
||||
}
|
||||
match crate::async_runtime::block_on(proxy_builder.send()) {
|
||||
match crate::async_runtime::block_on(proxy_builder.body(request.body().clone()).send()) {
|
||||
Ok(r) => {
|
||||
let mut response_cache_ = response_cache.lock().unwrap();
|
||||
let mut response = None;
|
||||
|
@ -159,6 +159,7 @@ fn get_response<R: Runtime>(
|
|||
}
|
||||
builder.body(asset.bytes.into())?
|
||||
};
|
||||
|
||||
if let Some(handler) = &web_resource_request_handler {
|
||||
handler(request, &mut response);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue