Headers


In Mockoon you can easily define response headers for each route but also at the environment level. Response headers defined on a route will override those defined in an environment.

 Route level response headers

To add response headers like Content-Type to your route, go to the route's Headers tab and fill the name and value fields:

Complete route response header form

You can add one or more headers by clicking on the "Add header" button at the bottom of the list:

Add route response header

 Environment level response headers

You can also add response headers at the environment level. Headers defined in an environment will be overridden if they are redefined on a route. To define an environment response header:

Open the Environment Headers by clicking on the tab at the top of the window:

click on the headers tab

And add one or more headers by clicking on the "Add header" button at the bottom of the list:

Add environment header