Reputation: 825
I get the following error response:
{
"error": {
"name": "mockRequestNotFoundError",
"header": "No matching requests",
"message": "Double check your method and the request path and try again."
}
}
When I pass -
as an URI param for a Postman request created via a mocking server unlike when I pass the same URI param value in a request not created via a mocking server it's working well!
URL: http://{{host}}/order/{{subUserId}}/{{BusinessDate}}/5
host: {mocking-server-url-without-http-keyword}
subUserId: 1
BusinessDate: 2020-01-12-17-07-21
HTTP request header: x-api-key
: {{postman_secret_API_key}}
The main request by using the mocking server as a host which returns data correctly:
The mocked request by using the mocking server as a host which returns an error:
Upvotes: 3
Views: 7101
Reputation: 25881
The mock example
would need to match the path of the main request for it to be returned.
For example:
If it doesn't, it wouldn't be able to find the mock example
that you're using:
I'm unsure of your particular context but you could also use different Request Headers
on your main request to point to specific mock examples:
x-mock-response-code:200
x-mock-response-name:<name of the mock example>
Upvotes: 3