File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " http " : patch
3+ ---
4+
5+ Improve response performance by using the new IPC streaming data.
Original file line number Diff line number Diff line change @@ -163,16 +163,15 @@ pub async fn fetch_send<R: Runtime>(
163163 } )
164164}
165165
166- // TODO: change return value to tauri::ipc::Response on next alpha
167166#[ command]
168167pub ( crate ) async fn fetch_read_body < R : Runtime > (
169168 app : AppHandle < R > ,
170169 rid : RequestId ,
171- ) -> crate :: Result < Vec < u8 > > {
170+ ) -> crate :: Result < tauri :: ipc :: Response > {
172171 let mut response_table = app. http ( ) . responses . lock ( ) . await ;
173172 let res = response_table
174173 . remove ( & rid)
175174 . ok_or ( Error :: InvalidRequestId ( rid) ) ?;
176175
177- Ok ( res. bytes ( ) . await ?. to_vec ( ) )
176+ Ok ( tauri :: ipc :: Response :: new ( res. bytes ( ) . await ?. to_vec ( ) ) )
178177}
You can’t perform that action at this time.
0 commit comments