Response with File
Sometimes, you need to respond with a file to incoming requests (e.g. to return contractual documents). This endpoint behaviour can be mocked with the scenario's responseFilePath
attribute. It defines the path to a static file to be exposed as response. The path needs to be a string
and is interpreted relatively to the script file, that defines the register()
function.
The file type of referenced file is being used to auto populate the
Content-Type
response header.
If
responseFilePath
is specified, a configuredresponseBody
would be ignored.
📃
Respond with File
Open Recipe
Updated almost 3 years ago