Best content to include in a default route?

buddhiv

Buddhi Vikasitha

Posted on October 20, 2021

Best content to include in a default route?

I feel like this is a good point for a discussion and not a question. I have the set of URLs as follows.

https://domain/api/users
https://domain/api/users/:userId
https://domain/api/posts
https://domain/api/posts/:postId

As usual I return json content when the above APIs are called.

What should be returned if the following APIs are called?

https://domain/api/
https://domain/

Is it just 404-Not Found?
What is more suitable?

💖 💪 🙅 🚩
buddhiv
Buddhi Vikasitha

Posted on October 20, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related