Mocking Response Codes
When working on large front end projects which rely on data sources from remote servers, it’s a great practice to test different types of response codes such as server errors, unauthorized access errors, etc. to validate that you’re handling all edge cases. It’s complicated and annoying to get your remote source to return those errors and in that case you would setup a mock server which returns the types of responses you want. http://httpstat.us/ allows you to do just that and more importantly you can pass in whatever status you want and it’ll return the server information you need to convey the right message to your users.
0 Replies