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
13
14
15
16
use reqwest::Response;

use crate::components::data::{Http, Query};

impl Http {
    pub async fn get<Path: Into<String>>(
        &self,
        path: Path,
        query: Query,
    ) -> Result<Response, Box<dyn std::error::Error>> {
        let client = &self.client;
        let url = self.url(path);
        let resp = client.get(url).query(&query).send().await?;
        Ok(resp)
    }
}