mirror of
https://github.com/kristoferssolo/transmission-rpc.git
synced 2025-10-21 20:10:37 +00:00
expected header not to be present
This commit is contained in:
parent
8d98d1f4bc
commit
989f1cf8d0
10
src/lib.rs
10
src/lib.rs
@ -64,11 +64,11 @@ impl TransClient {
|
||||
.send()
|
||||
.await;
|
||||
let session_id = match response {
|
||||
Ok(ref resp) => resp.headers()
|
||||
.get("x-transmission-session-id")
|
||||
.expect("Unable to get session id")
|
||||
.to_str()
|
||||
.unwrap(),
|
||||
Ok(ref resp) =>
|
||||
match resp.headers().get("x-transmission-session-id") {
|
||||
Some(res) => res.to_str().expect("header value should be a string"),
|
||||
_ => ""
|
||||
}
|
||||
_ => ""
|
||||
}.to_owned();
|
||||
info!("Received session id: {}", session_id);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user