Function serialize_to_http_request

Source
pub fn serialize_to_http_request<T>(
    base_url: &Uri,
    path: &str,
    method: Method,
    request: &T,
) -> Result<Request<Body>, ProtocolError>
where T: Serialize,
Expand description

Serializes T into HttpRequest<Body>. Returns an “internal” error if JSON serialization fails. Can be useful for implementing RequestHttpConvert::to_http_request.