Set user agent for bahn.expoert api requests
This commit is contained in:
parent
26ea045216
commit
e0a350725e
@ -198,6 +198,7 @@ async fn route_station_to_dest_station(
|
||||
|
||||
let client = reqwest::Client::new();
|
||||
let stationdata_req = client.get(format!("https://bahn.expert/api/iris/v2/abfahrten/{}?lookahead=150&lookbehind=10", station_properties.code))
|
||||
.header(reqwest::header::USER_AGENT, "https://nurausstieg.clerie.de - abuse: nurausstieg@clerie.de")
|
||||
.send().await
|
||||
.map_err(|_err| (StatusCode::INTERNAL_SERVER_ERROR, String::from("Station Data cannot be fetched")))?;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user