mock document/pdf file as a response object

I am trying to return pdf / docx file as mock response object, is there any implementation for this once the user hit the url pdf will be downloaded fro mock response.

0 1 1,594
1 REPLY 1

I think you need to add extra headers to response, and your mock body is the actual string of the pdf

ContentType="application/pdf";
Content-Disposition="attachment;filename="file.pdf""