stubby4node
stubby4node copied to clipboard
Try to compare with JSON Parser in HTTP POST
From my API requirement
my_api.yml
- request:
url: /demo
method: POST
headers:
content-type: application/json
file: input.json
response:
- status: 200
body: "Haha!"
input.json
{"id": 1}
When i sent a POST request to mock api server with Payload in JSON format
{
"id": 1
}
Result => Not match !! because data and indent not math or equal !!
Solution :: I added logic in function match() to compare request.post and post with JSON parser
Welcome for feedback..
Thank you