gitignore-template-generator 0.7.3

A binary crate to generate templates for .gitignore files
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::ProgramExit;
pub use crate::http_client::impls::{
    MockEndpointHttpClient, MockHttpClient, UreqHttpClient,
};

/// Http client trait to make HTTP calls.
pub trait HttpClient {
    /// Make a GET HTTP call to given url.
    ///
    /// # Arguments
    /// * `url` - the url to which to make the HTTP call.
    ///
    /// # Returns
    ///
    /// A result containing the response body of HTTP call if successful, or
    /// a [`ProgramExit`] on error (e.g. 4xx, network issues...).
    fn get(&self, url: &str) -> Result<String, ProgramExit>;
}