refactor reqwest client suite w/ conf items.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-03-16 15:54:58 -07:00 committed by June
parent 61b1d6d869
commit 9334f938ae
7 changed files with 173 additions and 96 deletions

View file

@ -239,7 +239,7 @@ where
let url = reqwest_request.url().clone();
debug!("Sending request to {destination} at {url}");
let response = services().globals.federation_client().execute(reqwest_request).await;
let response = services().globals.client.federation.execute(reqwest_request).await;
debug!("Received response from {destination} at {url}");
match response {
@ -517,7 +517,8 @@ async fn request_well_known(destination: &str) -> Option<String> {
let response = services()
.globals
.default_client()
.client
.well_known
.get(&format!("https://{destination}/.well-known/matrix/server"))
.send()
.await;