I am using Rest Assured API Automation framework for API Testing and can anyone tell me difference between the methods param() and queryParam() which we use in get() and POSt() request.
RESTassured request parameters can be either query parameters or form parameters.
If you don't specify which, RESTassured will assume GET params are query params and POST params are form params, e.g.
given()
.spec(spec)
.param("active", "True")
.when()
.post("save")
.then()
.statusCode(200);
will send form parameters in the body. If you require query parameters, you must use .queryParam("active", "true")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With