Added logging for the request
This commit is contained in:
parent
671a448fd7
commit
ef87370066
@ -10,7 +10,6 @@ pub async fn perform_request<B: Serialize, R: DeserializeOwned>(
|
|||||||
expected_status_code: u16,
|
expected_status_code: u16,
|
||||||
headers: Vec<(String, String)>,
|
headers: Vec<(String, String)>,
|
||||||
) -> Result<R, Error> {
|
) -> Result<R, Error> {
|
||||||
|
|
||||||
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));
|
||||||
|
|
||||||
@ -22,6 +21,7 @@ pub async fn perform_request<B: Serialize, R: DeserializeOwned>(
|
|||||||
Some(b) => req_incomplete.json(&b),
|
Some(b) => req_incomplete.json(&b),
|
||||||
None => req_incomplete,
|
None => req_incomplete,
|
||||||
};
|
};
|
||||||
|
println!("{:?}", req_complete);
|
||||||
match req_complete.send().await {
|
match req_complete.send().await {
|
||||||
// Error handling here
|
// Error handling here
|
||||||
Ok(res) => {
|
Ok(res) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user