oro-client 0.3.34

Generic client for the HTTP NPM api.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use reqwest::Response;

pub(crate) trait Notify {
    fn notify(self) -> Self;
}

impl Notify for Response {
    fn notify(self) -> Self {
        if let Some(npm_notice) = self.headers().get("npm-notice") {
            if let Ok(npm_notice) = npm_notice.to_str() {
                tracing::info!("{}", npm_notice);
            }
        }
        self
    }
}