Update (or override) request query params.
1linkconfiguration:
2link host: api.mycompany.com
3link scheme: https
4link base_path: /api
5linkspecs:
6link - request:
7link path: /users
8link method: get
9link query_params:
10link - name: firstName
11link value: Matthew
12link response:
13link status_code: 200
14link# GET https://api.mycompany.com/users?firstName=Matthew
See also: Example: Suite Using Query Params
Dynamic query params can be added by setting query_params
as an object to the this.test
context:
1linkconfiguration:
2link host: api.mycompany.com
3link scheme: https
4link base_path: /api
5linkspecs:
6link - before_test:
7link run_type: inline
8link inline:
9link function: !!js/function >
10link function () {
11link this.test.query_params = {
12link firstName: 'Matthew',
13link };
14link }
15link request:
16link path: /users
17link method: get
18link response:
19link status_code: 200
20link# GET https://api.mycompany.com/users?firstName=Matthew
See also: Overview of Hooks