Skip to main content

create_json_response_handler

Function create_json_response_handler 

Source
pub fn create_json_response_handler<T>() -> ResponseHandler<T>
where T: DeserializeOwned + Send + 'static,
Expand description

Parse a successful JSON response using the endpoint’s response type.

The body is size-limited to DEFAULT_MAX_JSON_RESPONSE_SIZE (or HttpRequest::max_json_response_bytes, when the caller overrides it) — deliberately smaller than the binary-download bound, since a JSON success body is deserialized straight into T and held alongside the raw bytes.