I'm writing tests against an API that hmacsha1 hashes the entire get request query string using a secret key and sends it in the header. So I need to compute for this value, set it in the header, before executing the test. like this:
expect()
.statusCode(200)
.given()
.parameter("key", "abc")
.parameter("param2", "def")
.header("Authorization",hmacsha1(queryString,"secretKey"))
.when()
.get("/endpoint");
Is there a way I can access the current query string at the "queryString" location? basically it should give me "key=abc¶m2=def" so I can hash it in-place.
Thanks a lot!