Possible fix
This commit is contained in:
parent
24f6b6f3c1
commit
2e7a6329b5
@ -13,13 +13,13 @@ pub async fn perform_request<B: Serialize, R: DeserializeOwned>(
|
|||||||
let mut req_incomplete =
|
let mut req_incomplete =
|
||||||
client.request(method, format!("{url}{path}", url = base_url, path = path));
|
client.request(method, format!("{url}{path}", url = base_url, path = path));
|
||||||
|
|
||||||
//for header in headers {
|
for header in headers {
|
||||||
// req_incomplete = req_incomplete.header(&header.0, &header.1);
|
req_incomplete = req_incomplete.header(&header.0, &header.1);
|
||||||
//}
|
}
|
||||||
|
|
||||||
let req_complete = match body {
|
let req_complete = match body {
|
||||||
Some(b) => req_incomplete.json(&b),
|
Some(b) => req_incomplete.json(&b),
|
||||||
None => req_incomplete,
|
None => req_incomplete.header("content-length", 0),
|
||||||
};
|
};
|
||||||
println!("{:?}", req_complete);
|
println!("{:?}", req_complete);
|
||||||
match req_complete.send().await {
|
match req_complete.send().await {
|
||||||
|
Loading…
Reference in New Issue
Block a user