dwh 0.7.1

A library to use the digitronic protocol dwh
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use reqwest::RequestBuilder;

use super::ReqwestHooks;

pub struct BasicAuth {
    user: String,
    password: String,
}

#[async_trait::async_trait]
impl ReqwestHooks for BasicAuth {
    async fn before_send(&self, req: RequestBuilder) -> super::super::Result<RequestBuilder> {
        Ok(req.basic_auth(self.user.clone(), Some(self.password.clone())))
    }
}