How to Trigger a Mock Response for a digiRunner API in Postman #71
-
Hey everyone, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @jerryhsu0910 , Add the following header to your Postman request: Header Name: |
Beta Was this translation helpful? Give feedback.
Hi @jerryhsu0910 ,
That's a great question, and it's quite straightforward to achieve!
To have digiRunner return the configured mock response body for an API when making a request from Postman (or any other client), you simply need to include a specific header in your request.
Add the following header to your Postman request:
Header Name:
dgr_mock_test
Header Value:true
By setting the
dgr_mock_test
header totrue
, digiRunner will bypass the actual backend service and return the mock response body you've configured for that API.Give it a try, and let me know if it works for you!