14 lines
241 B
Rust
14 lines
241 B
Rust
|
use tiny_http::Request;
|
||
|
|
||
|
|
||
|
pub trait Url {
|
||
|
fn get_url_without_parameters(&self) -> String;
|
||
|
}
|
||
|
|
||
|
impl Url for Request {
|
||
|
fn get_url_without_parameters(&self) -> String {
|
||
|
self.url().split("?").next().unwrap().to_string()
|
||
|
}
|
||
|
}
|
||
|
|