# Response

Mock JSON Response helps control every aspect of a response by providing the following attributes

1. status
2. headers
3. inlineData
4. bodyFileName

Here is an example:

```javascript
{
    status: 200,  //status of response
    headers: {    //headers in response
        "Content-Type": "application/json",
    },
    inlineData: {   //a way to pass raw data
        test: 'inline data'
    },
    bodyFileName: "data.json"   //name of the file with raw json data
}
```

{% hint style="info" %}
&#x20;if the status is not defined, 200 is sent by default.
{% endhint %}

### Status

status code of the response to be sent.

### Headers

Headers to be set in the response.

### Inline Data

Its a JS object which holds the data to be sent in the response.

### Body File Name

This is a string which will define the name of the JSON file that will be used to import the response.

{% hint style="info" %}
inlineData takes precedence on bodyFIleName
{% endhint %}

Other attributes of the response object will be discussed in upcoming chapters.
