I am trying to mock the service response using JSON-server.
Actual URL is: message-service/notifications?id=xyx
I am mocking this URL to hit a dummy URL through JSON-server:
{
"/message-service/notifications?id=:id": "/notifications/:id"
}
my Json object looks like this:
"notifications": [
{
"id": "xyz",
"getNotificationsResponse":{ }
}
]
The problem is JSON-server is not hitting the dummy URL to fetch the data. What should be changed here to make the JSON server respond with the data?
Error i am getting in console:
Request URL:http://localhost:9081/message-service/notifications?id=xyz
Request Method:GET
Status Code:404 Not Found