Skip to main content

serve_file_response

Function serve_file_response 

Source
pub fn serve_file_response(
    livereload: &LiveReload,
    path: &Path,
    bytes: Vec<u8>,
) -> HttpResponse
Expand description

Build a 200 response for a successfully-read file, injecting the livereload script into HTML payloads. Public so callers with custom routing can serve files using the same headers/injection policy.