Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to compare with JSON Parser in HTTP POST #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

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