pub trait ValidRequest {
    // Required methods
    fn new(
        method: String,
        path: String,
        headers: HashMap<String, String>,
        body: String,
        host: String,
        port: u16,
        http_version: String
    ) -> Self;
    fn send(&self) -> Result<Response, RequestError>;
}
Expand description

Describes a valid request

Required Methods§

source

fn new( method: String, path: String, headers: HashMap<String, String>, body: String, host: String, port: u16, http_version: String ) -> Self

Create a new request

source

fn send(&self) -> Result<Response, RequestError>

Send the request synchronously

Object Safety§

This trait is not object safe.

Implementors§

source§

impl ValidRequest for Request

Implement the ValidRequest trait for the Request type