[−][src]Trait ruma_api::OutgoingRequest
A request type for a Matrix API endpoint. (trait used for sending requests)
Associated Types
type EndpointError: EndpointError[src]
A type capturing the expected error conditions the server can return.
type IncomingResponse: TryFrom<Response<Vec<u8>>, Error = FromHttpResponseError<Self::EndpointError>>[src]
Response type returned when the request is successful.
Associated Constants
Loading content...Required methods
pub fn try_into_http_request(
self,
base_url: &str,
access_token: Option<&str>
) -> Result<Request<Vec<u8>>, IntoHttpError>[src]
self,
base_url: &str,
access_token: Option<&str>
) -> Result<Request<Vec<u8>>, IntoHttpError>
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
https://matrix.org. 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.