Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Now suppose we want to extract the name and email property from the incoming mock request and we want to use these properties in constructing the response of our Mock API. First we will see, how we may extract values from incoming JSON request body:

To extract the name and email property from the request JSON body, simply declare them as variables in the JSON request body as shown below.

Now, you may use these extracted variables in the API mock response like this:

Image Added