1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-08-09 04:22:45 +03:00

Simplify the HTTP client building

Also supports loading the WebPKI roots instead of the native ones for
TLS
This commit is contained in:
Quentin Gliech
2022-09-15 16:00:33 +02:00
parent a663deb7e1
commit 7b819ffa8b
10 changed files with 216 additions and 148 deletions

View File

@@ -72,7 +72,7 @@ impl Options {
json: false,
url,
} => {
let mut client = mas_http::client("cli-debug-http");
let mut client = mas_http::client("cli-debug-http").await?;
let request = hyper::Request::builder()
.uri(url)
.body(hyper::Body::empty())?;
@@ -97,6 +97,7 @@ impl Options {
url,
} => {
let mut client = mas_http::client("cli-debug-http")
.await?
.response_body_to_bytes()
.json_response();
let request = hyper::Request::builder()