Initial commit
This commit is contained in:
commit
3ac67f0462
9 changed files with 120 additions and 0 deletions
1
src/entities/mod.rs
Normal file
1
src/entities/mod.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub mod request;
|
13
src/entities/request.rs
Normal file
13
src/entities/request.rs
Normal file
|
@ -0,0 +1,13 @@
|
|||
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()
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue