The File Mocking functionality allows you to simulate responses with specific file types, such as PDF or CSV.
To mock a file, navigate to the "Headers" tab and add or modify the "Content-Type" header according to your needs. Currently supported values to mock a file are:
This will make the endpoint return the corresponding file. It's important to note that this feature does not support user-uploaded files. Instead, the response will consistently be the same example mock file.
In the request body, you will receive a message indicating the file type being served. For example:
//Serving PDF file. Checkout headers tab.
Create a project