Skip to main content

json_raw

Function json_raw 

Source
pub fn json_raw(body: impl Into<String>) -> Response
Expand description

Build a 200 OK response with application/json content type.

The body is written verbatim; it is the caller’s responsibility to pass a valid JSON document (e.g. from serde_json::to_string(&value)?).