cdumay_http_client 0.3.2

A library to call remote web application
Documentation
use std::fmt::Debug;

use reqwest::header::{HeaderName, HeaderValue};

pub mod basic;

pub trait Authentication: Debug {
    fn username(&self) -> Option<String>;
    fn password(&self) -> Option<String>;
    fn as_header(&self) -> Option<(HeaderName, HeaderValue)>;
}

#[derive(Debug)]
pub struct NoAuth;


impl Authentication for NoAuth {
    fn username(&self) -> Option<String> { None }
    fn password(&self) -> Option<String> { None }
    fn as_header(&self) -> Option<(HeaderName, HeaderValue)> { None }
}