Skip to content

Conversation

@up1
Copy link

@up1 up1 commented Feb 9, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant