$response.file

Method $response.file() writes the specified file into the body stream in a efficient way.

Syntax

$response.file(filePath)

Parameters

filePath

Path to file (string)

Examples

$response.file('./sample.txt')