[−][src]Function async_http_proxy::http_connect_tokio_with_basic_auth
pub async fn http_connect_tokio_with_basic_auth<IO>(
io: &mut IO,
host: &str,
port: u16,
username: &str,
password: &str
) -> Result<(), HttpError> where
IO: AsyncRead + AsyncWrite + Unpin,
This is supported on crate features
runtime-tokio
and basic-auth
only.Connect to the server defined by the host and port with basic auth and check if the connection
was established.
The functions will use HTTP CONNECT request and the tokio runtime.
Example
use async_http_proxy::http_connect_tokio_with_basic_auth;
use std::error::Error;
use tokio::net::TcpStream;
// Features "runtime-tokio" and "basic-auth" have to be activated
#tokio::main
async fn main() -> Result<(), Box