Docs
Create

Create Mock Rule

Click on Reset / New + to start creating a new mock response rule.

Create Mock Response

After configuring the following parameters hit save.

Parameters

Regex toggle

Use this button to toggle regex based url matching.

regex toggle button

URL

Enter the URL of the request that you want to mock. You can specify the exact URL or use regular expressions for pattern matching.

Url with regex

Url with regex

Absolute url without regex matching

Absolute url

Method

Select the HTTP method (GET, POST, PUT, DELETE, etc.) of the request. Default is GET.

Method Select

Status Code

Specify the HTTP status code to be returned in the mock response. Default will be 200 (OK)

Status code

Delay

Specify the delay (in milliseconds) before the mock response is sent. This parameter is optional. Defaults to 0.

Delay

Label

Provide a label or identifier for the mock response. This parameter is optional. This will come in handy if you have multiple requests with same url but with different responses. Specify different labels and activate / deactivate accordingly.

Specify label from here.

Label

Label will be visible in rules list like this:

Label in rule tile

Response Body

Enter the desired response content in JSON format or raw text.

Response body

Response Headers

  • Click on the Resp Headers tab to configure Response headers.
  • Add, edit and remove response headers here.
  • Headers can be activated / deactivated based on use case.

Mock Response Headers