How to send HttpHeader value of x-api-key while sending request in REST Api tests

Please follow this documentation-
https://docs.katalon.com/katalon-studio/docs/parameterize-a-web-service-object.html#for-restful-request

For the HTTP Header Katalon is supporting Key and Value pairs.

Like-

‘Send the request with jwt token’

ResponseObject getResponse = WS.sendRequest(findTestObject(‘Object Repository/OR JwtToken/GetRequest - Jwt’, [(‘jwt_token’) : token]))

‘Assert on the status code’

Assertions.assertThat(getResponse.getStatusCode()).isEqualTo(200)

Hope this will help you.

Thanks Happy Testing.

1 Like