Trait http_typed::Request

source ·
pub trait Request: Sized {
    type Serializer: SerializeBody<Self>;
    type Response;

    // Required methods
    fn method(&self) -> HttpMethod;
    fn path(&self) -> String;
}

Required Associated Types§

source

type Serializer: SerializeBody<Self>

Specify a pre-defined approach to serialize a request body. For example:

  • SerdeJson
  • NoBody
source

type Response

Type to deserialize from the http response body

Required Methods§

source

fn method(&self) -> HttpMethod

HTTP method that the request will be sent with

source

fn path(&self) -> String

String to appended to the end of url when sending this request.

Implementors§