Every time I create a new API, I always end up adding these two controllers.
One is a /status controller, which does health checks on various parts of my API and responds if everything is ok. I then call these endpoints from a monitoring tool to check on the status of my API.
The other is an /errors controller, which will respond with a given error code whenever an endpoint is called. I use this from my user interfaces to ensure that the users have a good experience when something goes wrong on the backend.
I show how I implement these in a .Net 7 API.
Follow me on social media!
Twitter: / scriptbytesio
Instagram: / scriptbytes
Threads: https://www.threads.net/@scriptbytes
Check out my blog!
https://scriptbytes.io/
In questa pagina del sito puoi guardare il video online Must Have API Controllers! della durata di ore minuti seconda in buona qualità , che l'utente ha caricato ScriptBytes 11 settembre 2023, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 190 volte e gli è piaciuto 14 spettatori. Buona visione!