neto 0.0.4

Enhanced HTTP client API wrapper for reqwest with improved ergonomics
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::components::data::Http;

impl Http {
    pub fn url<Path: Into<String>>(&self, path: Path) -> String {
        let path = path.into();
        if self.base_url.ends_with('/') || path.starts_with('/') {
            format!("{}{}", self.base_url, path)
        } else {
            format!("{}/{}", self.base_url, path)
        }
    }
}