Skip to main content

bytes

Function bytes 

Source
pub fn bytes(body: impl Into<Bytes>) -> Response
Expand description

Create a binary response from raw bytes.

No default Content-Type is set; add one via .header() on the inner HttpResponse.