File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
crates/tauri/src/protocol Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " tauri " : patch:bug
3+ ---
4+
5+ Forward request body on the mobile frontend proxy.
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ pub fn get<R: Runtime>(
6969}
7070
7171fn get_response < R : Runtime > (
72- request : Request < Vec < u8 > > ,
72+ # [ allow ( unused_mut ) ] mut request : Request < Vec < u8 > > ,
7373 #[ allow( unused_variables) ] manager : & AppManager < R > ,
7474 window_origin : & str ,
7575 web_resource_request_handler : Option < & WebResourceRequestHandler > ,
@@ -118,9 +118,11 @@ fn get_response<R: Runtime>(
118118 . build ( )
119119 . unwrap ( )
120120 . request ( request. method ( ) . clone ( ) , & url) ;
121+ proxy_builder = proxy_builder. body ( std:: mem:: take ( request. body_mut ( ) ) ) ;
121122 for ( name, value) in request. headers ( ) {
122123 proxy_builder = proxy_builder. header ( name, value) ;
123124 }
125+ proxy_builder = proxy_builder. body ( request. body ( ) . clone ( ) ) ;
124126 match crate :: async_runtime:: safe_block_on ( proxy_builder. send ( ) ) {
125127 Ok ( r) => {
126128 let mut response_cache_ = response_cache. lock ( ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments