Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Status Code #167

Open
gautambitious opened this issue May 31, 2021 · 1 comment
Open

Custom Status Code #167

gautambitious opened this issue May 31, 2021 · 1 comment

Comments

@gautambitious
Copy link

Sometimes developers need to handle responses based on their status code. Can you add routes to return common status codes like 401, 404?

@UmarBaraq
Copy link

DummyJSON supports this:
https://dummyjson.com/docs/http

fetch('https://dummyjson.com/http/404/Hello_Peter')
.then(res => res.json())
.then(console.log);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants