pub(crate) fn success_response(body: Option<String>) -> Response {
    if let Some(body) = body {
        let mut r = Response::new(Version::Http11, StatusCode::OK);
        r.set_body(Body::new(body));
        r
    } else {
        Response::new(Version::Http11, StatusCode::NoContent)
    }
}
/// Generate a successful HTTP response message.
Generate a successful HTTP response message.
Generate a successful HTTP response message .
pub(crate) fn success_response(body: Option<String>) -> Response {
    if let Some(body) = body {
        let mut r = Response::new(Version::Http11, StatusCode::OK);
        r.set_body(Body::new(body));
        r
    } else {
        Response::new(Version::Http11, StatusCode::NoContent)
    }
}
pub ( crate ) fn success_response ( body : Option < String > ) -> Response { if let Some ( body ) = body { let mut r = Response :: new ( Version :: Http11 , StatusCode :: OK ) ; r . set_body ( Body :: new ( body ) ) ; r } else { Response :: new ( Version :: Http11 , StatusCode :: NoContent ) } }
Generate a successful HTTP response message.
Generate a successful HTTP response message .
body
Option<String>
body
Option<String>