Initial commit

This commit is contained in:
Jan Klattenhoff 2024-08-20 08:05:01 +02:00
commit 3ac67f0462
9 changed files with 120 additions and 0 deletions

1
src/entities/mod.rs Normal file
View file

@ -0,0 +1 @@
pub mod request;

13
src/entities/request.rs Normal file
View 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()
}
}