pub fn new(config: ClientConfig, transfer: bool) -> Self {
        // Set up the reqwest client
        let mut builder = ReqwestClientBuilder::new();
        match config.timeout {
            Some(timeout) if !transfer => builder = builder.timeout(timeout),
            _ => {}
        }
        match config.transfer_timeout {
            Some(timeout) if transfer => builder = builder.timeout(timeout),
            _ => {}
        }
        let reqwest = builder.build().expect("failed to build reqwest client");

        // Build the client
        Self { config, reqwest }
    }
/// Construct the ffsend client with the given `config`.
///
/// If this client is used for transfering files, `transfer` should be true.
// TODO: properly handle errors, do not unwrap
Construct the ffsend client with the given `config`.
If this client is used for transfering files, `transfer` should be true.
TODO: properly handle errors, do not unwrap
Construct the ffsend client with the given ` config ` . If this client is used for transfering files ` transfer ` should be true . TODO : properly handle errors do not unwrap
pub fn new(config: ClientConfig, transfer: bool) -> Self {
        // Set up the reqwest client
        let mut builder = ReqwestClientBuilder::new();
        match config.timeout {
            Some(timeout) if !transfer => builder = builder.timeout(timeout),
            _ => {}
        }
        match config.transfer_timeout {
            Some(timeout) if transfer => builder = builder.timeout(timeout),
            _ => {}
        }
        let reqwest = builder.build().expect("failed to build reqwest client");
        // Build the client
        Self { config, reqwest }
    }
pub fn new ( config : ClientConfig , transfer : bool ) -> Self { // Set up the reqwest client let mut builder = ReqwestClientBuilder :: new ( ) ; match config . timeout { Some ( timeout ) if ! transfer => builder = builder . timeout ( timeout ) , _ => { } } match config . transfer_timeout { Some ( timeout ) if transfer => builder = builder . timeout ( timeout ) , _ => { } } let reqwest = builder . build ( ) . expect ( " " ) ; // Build the client Self { config , reqwest } }
Construct the ffsend client with the given `config`.
Construct the ffsend client with the given ` config ` .
config
ClientConfig
transfer
bool
config
ClientConfig
transfer
bool