adt-apjc / YAP

BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Failing processing payloads with variable in JSON and text #88

Closed marumer closed 1 year ago

marumer commented 1 year ago

Validated that CNC accept a JSON message for /crosswork/sso/v1/tickets instead of the text

               "url": "/crosswork/sso/v1/tickets",
               "method": "post",
               "data": { "username": "my_user", "password": "my_password" },

but we can not hardcode these variables and we have an issue using our double curly bracket JSON message. Based on rfc https://www.rfc-editor.org/rfc/rfc7159#section-7 curly bracket doesn’t have to be escaped and I didn't find a suitable escape. without escape image

If we revert back to string payload to be sent with "Content-Type": "application/x-www-form-urlencoded", and I am passing the variables, YAP is not converting the string properly: image

same without using variables but plain text{{}} image

We can change the DisplayRequestAs to text and when hardcoding the variable, it works but YAP is still not processing passing the variables in the string image

image

marumer commented 1 year ago

Marco to test passing variables as this example: { "username": "{{user}}", "password": "{{password}}" }