In this blog we will learn how to configure multiple responses for same response status code and how to use Wildcards. If you want to see how to use Postman (basic usage) then refer my blog Postman basic setup
Let's take books egample we saw in Postman basic setup a step further.Say, in this case, we have books by regions. We have 3 books in Europe region( I know it's too less but just an egample :)) and 2 books in America region. The idea is to show you how to configure two Examples for same status code using Wildcards
You can download both sample responses from my github link Github link to sample responses Files are named booksamerica and bookseurope.
In my Postman basic's blog Postman basic setup , i mentioned how incoming request is mapped to one of the saved examples.In that blog please refer section "How the incoming mock request matches one of the saved Egample".
In that blog I also mentioned how there is a Postman's algortihm which try to match the incoming request to closest possible saved example.I wont get into full algorithm but I can show you a quick example of how minor typos are ignored by Postman and still get us desired response.Lets look below