postmanpostman-mocks

Postman Mock with Path Variables


So I have successfully setup a postman mock server and can leverage the simple GETs that do not have any path variables in the api url but ALL the GETs that are something like {{url}}/users/:urserId or something like {{url}}/users/:userId/favorits are responding with mockRequestNotFoundError

just trying to figure out the correct way to get this working with the path variables

enter image description here


Solution

  • You'll need to specify the value of :userId in the uri:

    Let's say you have a value : 10, your uri for mocking would become {{url}}/users/10/favorits