Query Parameters

Using Query Parameters

You can write query parameters straight into a request URL, or add them one by one under Query Params (click Click for more advanced options on the request to see it):

https://www.example.com?query1=value1&query2=value2
https://api.example.com/v2/resources/1?query1=value1&query2=value2

The URL and the Query Params list always show the same parameters. When you type a URL that contains a query string, LoadFocus copies the parameters into the Query Params list, replacing the rows that were there. When you edit a row, it rewrites the URL to match. A fragment such as #hash1 is not kept: it is never sent to a server.

Query Parameters

Note: You cannot make a Query Param global (for example an API key) and use it in all requests. Add the parameter to every request that needs it.

Common Pitfalls

  • Special characters need encoding. Spaces, ampersands and other reserved characters inside a value must be percent-encoded (a space as %20, an & as %26). Enter the encoded value in a Query Params row: LoadFocus appends it to the URL as you typed it and does not encode it for you.
  • Repeated keys are all sent. If you add the same key twice (for example two query1 rows), both are sent. Some servers keep only one value per key, so test the exact request shape you expect in production.

For the full request setup, see How to Run a New Load Test.