[][src]Function httptest::responders::json_encoded

pub fn json_encoded<T>(data: T) -> impl Responder where
    T: Serialize

respond with a body that is the json encoding of data.

The status code will be 200 and the content-type will be application/json.