public Response < File > toFileResponse ( Path path ) { File file = path . toFile ( ) ; this . writeToFile ( file ) ; return new Response <> ( this . url , this . statusCode , this . cookies , this . headers , file ) ; }
Write response body to file and return response contains the file .