Trait ruma::api::OutgoingRequest[][src]

pub trait OutgoingRequest {
    type EndpointError: EndpointError;
    type IncomingResponse: IncomingResponse;

    const METADATA: Metadata;

    fn try_into_http_request<T>(
        base_url: &str,
        access_token: SendAccessToken<'_>
    ) -> Result<Request<T>, IntoHttpError>
        T: Default + BufMut
; }
This is supported on crate feature api only.
Expand description

A request type for a Matrix API endpoint, used for sending requests.

Associated Types

A type capturing the expected error conditions the server can return.

Response type returned when the request is successful.

Associated Constants

Metadata about the endpoint.

Required methods

Tries to convert this request into an http::Request.

This method should only fail when called on endpoints that require authentication. It may also fail with a serialization error in case of bugs in Ruma though.

The endpoints path will be appended to the given base_url, for example Since all paths begin with a slash, it is not necessary for the base_url to have a trailing slash. If it has one however, it will be ignored.