Passing Query Parameters

Webtau offers a number of ways of specifying query parameters: http.get("params?a=1&b=text") { // assertions go here } Use Map as a second parameter to pass query parameters. Suitable for languages that support in-line creation of Map . http.get("params", [a: 1, b: 'text']) { // assertions go here } Only http.get has a Map variant, for http.put , , etc you must use http.query . http.get("params", http.query([a: 1, b: 'text']), http.header(['x-param': 'value'])) { // assertions go here } Additionally http.query has a vararg variant which is more convenient for Java . http.get("params", http.query('a', '1', 'b', 'text')) { // assertions go here }

Parameters Encoding

All query parameters are encoded automatically. http.get("params", http.query([message: 'hello world !'])) { // assertions go here } params?message=hello+world+%21