I am having issues with trying to post a request using Zest.
I am trying to post a json object that contains something like this in it:
"fr": {
"translation": {
"balanced": "Équilibré"
}
}
However, the issue has to do with the special French characters. The same request works fine in JMeter, and via postman, and even if I use the "Requester" tab in ZAP UI but it will not work at all as request in a zest script.
This is what the ZAP logs show as part of the request when running from a zest script:
2023-04-17 13:37:35,907 [ZAP-IO-EventExecutor-3-6] DEBUG wire - http-outgoing-1473 >> " "fr": {[\n]"
2023-04-17 13:37:35,907 [ZAP-IO-EventExecutor-3-6] DEBUG wire - http-outgoing-1473 >> " "translation": {[\n]"
2023-04-17 13:37:35,907 [ZAP-IO-EventExecutor-3-6] DEBUG wire - http-outgoing-1473 >> " "balanced": "[0xffffffc9]quilibr[0xffffffe9]",[\n]"
2023-04-17 13:37:35,907 [ZAP-IO-EventExecutor-3-6] DEBUG wire - http-outgoing-1473 >> " }[\n]"
2023-04-17 13:37:35,907 [ZAP-IO-EventExecutor-3-6] DEBUG wire - http-outgoing-1473 >> " }[\n]"
This is what the ZAP logs show when I run it via the Requester.
2023-04-17 13:45:57,108 [Thread-7590] DEBUG wire - http-outgoing-1488 >> " "fr": {[\n]"
2023-04-17 13:45:57,108 [Thread-7590] DEBUG wire - http-outgoing-1488 >> " "translation": {[\n]"
2023-04-17 13:45:57,108 [Thread-7590] DEBUG wire - http-outgoing-1488 >> " "balanced": "[0xffffffc3][0xffffff89]quilibr[0xffffffc3][0xffffffa9]",[\n]"
2023-04-17 13:45:57,108 [Thread-7590] DEBUG wire - http-outgoing-1488 >> " }[\n]"
2023-04-17 13:45:57,108 [Thread-7590] DEBUG wire - http-outgoing-1488 >> " }[\n]"
The requester scenario requires the following header to work:
Content-Type: application/json; charset=utf-8
Other tools like JMeter and Postman work with the header as follows:
Content-Type: application/json; charset=utf-8
I am curious about what I am doing wrong? I know it isn't a configuration issue because removing the French characters makes the request work every time, so I am thinking there is something that ZAP doesn't like about having those characters there.
Thank you in advance!