mock-server icon indicating copy to clipboard operation
mock-server copied to clipboard

Response codes triggered by url params

Open hoda0013 opened this issue 9 years ago • 1 comments

Is there a way for the route to respond with a certain response code without needing to add a url parameter to induce the response code?

For example, if I have a route called /session, and I want to get a 200 response then I call base_url/session and if I have everything setup correctly I get a 200 response.

However, if I call the same route but want to get a 201 response instead, it seems that I am forced to call base_url/session?__statusCode=201

For my specific test case I can't change the url params on the fly so I'd prefer to have my client try to access the same route with the same params every time and be able to manipulate the server response rather than needing to induce a certain server response using params.

Does that make sense? Is it possible that this tool can be used in the way I've described?

hoda0013 avatar Nov 24 '15 21:11 hoda0013

+1

engFelipeMonteiro avatar Dec 21 '20 14:12 engFelipeMonteiro