pub fn user_agent(
    product: Option<HeaderValue>
) -> Result<HeaderValue, InvalidHeaderValue>
Available on crate feature client only.
Expand description

Gives the User-Agent header value for a client annotated with an added twitch_api product

Examples found in repository?
src/client/reqwest_impl.rs (line 49)
47
48
49
50
51
52
53
    fn default_client_with_name(product: Option<http::HeaderValue>) -> Result<Self, Self::Error> {
        let builder = Self::builder();
        let user_agent = user_agent(product)?;
        let builder = builder.user_agent(user_agent);
        let builder = builder.redirect(reqwest::redirect::Policy::none());
        builder.build().map_err(Into::into)
    }