Is it possible to add custom “Http request headers” to record the API services?
Hi Freezer, unfortunately you cannot add headers there outside of the preconfigured options. To easiest record a api request or a regular request requiring special headers i usually use cURL or postman for example.
With curl you would simply run the following command,
curl -x localhost:7997 -X POST --data @postdata.xml -H "Content-Type: application/soap+xml; charset=utf-8" http://cldemo.apicasystem.com:8001/CheckGamesService.svc
In this case it is the -H flag that allows you to define the headers and the -x flag is for your proxy (typically localhost:7997 for zebratester installations)
You can also make use of a definition file to import the request, you can do that in the following way,
-addPageBreak landing_page 3 35
GET / 200 -responseContentType “text/html” -requestHeaderField “User-Agent: ZebraTester 5.4-I”
By using the -requestHeaderField you can define your headers like in the curl command but instead of proxying it you go into the session cutter and import the .txt file that you have created in the above format
More information can be found on the following section of the documentation if you wanna play around with it,
this has been moved to the new Community