stubby4node icon indicating copy to clipboard operation
stubby4node copied to clipboard

Try to compare with JSON Parser in HTTP POST

Open up1 opened this issue 2 years ago • 0 comments

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

up1 avatar Feb 09 '23 06:02 up1