Added string concatenation to only have to set the base URI for lychee instance

Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
Louis Vallat 2021-10-17 10:17:34 +02:00
parent d30656cc45
commit 603e8127f9
No known key found for this signature in database
GPG Key ID: 0C87282F76E61283

View File

@ -11,7 +11,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let client = Client::builder().build::<_, hyper::Body>(https); let client = Client::builder().build::<_, hyper::Body>(https);
let req = Request::builder() let req = Request::builder()
.method(Method::POST) .method(Method::POST)
.uri(dotenv::var("LYCHEE_ENDPOINT").unwrap()) .uri(dotenv::var("LYCHEE_ENDPOINT").unwrap() + "api/Session::init")
.body(Body::empty()) .body(Body::empty())
.expect("error"); .expect("error");
let res = client.request(req).await?; let res = client.request(req).await?;
@ -24,3 +24,4 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
Ok(()) Ok(())
} }