INNER CODE UNIT · Rust
into_response
Trow-Registry/trow · src/routes/response/mod.rs:78
fn into_response(mut self) -> Response {
let headers = self.response.headers_mut();
headers
.entry(header::CONTENT_TYPE)
.or_insert(HeaderValue::from_str("application/json").unwrap());
headers
.entry(header::CONTENT_LENGTH)
.or_insert(HeaderValue::from(self.content_length));
tracing::trace!(response_headers = ?self.response.headers(), "OciJson response");
self.response
}
}