![discord nitro generator linux discord nitro generator linux](https://i.ytimg.com/vi/DCJVBaVxwEw/maxresdefault.jpg)
![discord nitro generator linux discord nitro generator linux](https://i.ytimg.com/vi/gCSfRYK1Ngc/maxresdefault.jpg)
You can access these types when using $fetch() or useFetch(). When using API routes (or middleware), Nitro will generate typings for these routes as long as you are returning a value instead of using res.end() to send a response. Request body and params are automatically handled, with correct Content-Type headersįor more information on $fetch features, check out ofetch.Automatic parsing of JSON responses (with access to raw response if needed).$fetch API is using ofetch, with key features including: This will make an API call to the server if run on the browser, but will directly call the relevant function if run on the server, saving an additional API call.
![discord nitro generator linux discord nitro generator linux](https://i.ytimg.com/vi/EHeghoCchEQ/maxresdefault.jpg)
Nitro allows 'direct' calling of routes via the globally-available $fetch helper. Learn more about the API layer in the server/ directory.