mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-12-20 15:11:45 +03:00
Merge pull request #96 from uqbar-dao/da/http-client-fix
http-client-fix
This commit is contained in:
commit
f0225458dc
@ -136,7 +136,6 @@ async fn handle_message(
|
|||||||
|
|
||||||
match client.execute(request).await {
|
match client.execute(request).await {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
if expects_response.is_some() {
|
|
||||||
let _ = send_to_loop
|
let _ = send_to_loop
|
||||||
.send(KernelMessage {
|
.send(KernelMessage {
|
||||||
id,
|
id,
|
||||||
@ -149,12 +148,12 @@ async fn handle_message(
|
|||||||
message: Message::Response((
|
message: Message::Response((
|
||||||
Response {
|
Response {
|
||||||
inherit: false,
|
inherit: false,
|
||||||
ipc: serde_json::to_vec::<Result<HttpResponse, HttpClientError>>(
|
ipc: serde_json::to_vec::<Result<HttpResponse, HttpClientError>>(&Ok(
|
||||||
&Ok(HttpResponse {
|
HttpResponse {
|
||||||
status: response.status().as_u16(),
|
status: response.status().as_u16(),
|
||||||
headers: serialize_headers(response.headers()),
|
headers: serialize_headers(response.headers()),
|
||||||
}),
|
},
|
||||||
)
|
))
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
metadata: None,
|
metadata: None,
|
||||||
},
|
},
|
||||||
@ -168,7 +167,6 @@ async fn handle_message(
|
|||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
make_error_message(
|
make_error_message(
|
||||||
our,
|
our,
|
||||||
|
Loading…
Reference in New Issue
Block a user