Use Cases


min read

Query Params Rule Documentation

Nafees Nehar

Introducing Query Param Rule

Modification of query parameters is one of the most popular feature requests we have received after script execution feature. We are very excited to announce the release of QueryParam as a new rule type. If you are not able to see QueryParam rule type, please update your extension by following this guide.

Use Cases

Query Parameters is important part of URL. When you want to pass data in HTTP Get request, that data is sent in the form of query params. Thus QueryParam rule can be extremely useful to test server’s behaviour with different query parameter. Query Params Rule can be used to perform the following modifications on a given url:

  1. RemoveAll parameters.
  2. Add parameter.
  3. Remove a specific parameter.

How to Create Query Param Rule

Please follow these steps to create Query Params rule in Requestly.

Click on Add Icon present in toolbar on Rules Page

Add rule button

Select Query Param Rule

Since Requestly supports multiple rule types, when you click on Add Icon, it takes you to Rule Type selection page. Click on Query Param Rule Card to create a new Query Param Rule.

Rule creation options

Create Query Param Rule

Based on your use case, you can populate different fields in Rule Editor. For Example, In this case we are adding dl=1 param to urls which contain

Query param rule dashboard


Example 1 — Add Parameter “c” when url contains “foo”
example 1
Example 2 — Remove All params and then add parameters “a” and “b” when url contains “example”
example 2


Q1. If I add a parameter by QueryParam rule and the same parameter already exists in the given url, will Requestly overwrite the parameter value ?
Ans: Yes, Requestly will overwrite the value present in the url to the value given in the rule. For example:

 Rule Definition:
 Url Contains
 Add Param “a” Value “200”

When Requestly gets above query param rule definition and the request url is, then it will change the param value to 200 as per the rule and the new url will be

. What is the difference between “Remove” and “RemoveAll” ?
Ans: RemoveAll will remove all the parameters while Remove will remove only provided parameter.


Keep reading

All Posts

Go next