fix(core): use correct http method for proxied server, closes #7191 (#7208)

This commit is contained in:
Amr Bashir 2023-06-15 14:29:20 +03:00 committed by GitHub
parent 0fa0fa4ccf
commit 2d2fd6abe2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
'tauri': 'patch'
---
Use correct HTTP method when making requests to the proxied server on mobile.

View File

@ -751,7 +751,10 @@ impl<R: Runtime> WindowManager<R> {
{
client_builder = client_builder.danger_accept_invalid_certs(true);
}
let mut proxy_builder = client_builder.build().unwrap().get(&url);
let mut proxy_builder = client_builder
.build()
.unwrap()
.request(request.method().clone(), &url);
for (name, value) in request.headers() {
proxy_builder = proxy_builder.header(name, value);
}