03 - Why 404 Page? Setting Correct Headers
In this lesson, we will set one correct header value to avoid returning web pages instead of JSON results. As you can see in the /api/categories/1, we see data for one category
We found 2 results for "api return html".
In this lesson, we will set one correct header value to avoid returning web pages instead of JSON results. As you can see in the /api/categories/1, we see data for one category
If you launch an API request from a client like Postman, you may see an error in HTML and not JSON. How to prevent it?
Our team is here to help. Ask us anything about Laravel development and we'll get back to you with personalized guidance.