1. How to Implement a Laravel JSON API that Only Allows Clients that Request JSON Responses
Updated on: 2021-03-15
Posted on: 2021-03-15
There are certain types of applications, like for instance APIs, that only serve data values as responses.
JSON is nowadays a common format to serve HTTP responses with data values represented as text.
When an API application is only meant to serve JSON based responses, it is useful to refuse serving requests from clients that are not ready to take JSON based responses, like for instance requests from regular browsers that expect HTML pages.
This package provides a solution that can be used in Laravel based applications to refuse serving HTTP requests from clients that are not ready to handle JSON based responses.
More ... Post a comment See comments (0) Trackbacks (0)
JSON is nowadays a common format to serve HTTP responses with data values represented as text.
When an API application is only meant to serve JSON based responses, it is useful to refuse serving requests from clients that are not ready to take JSON based responses, like for instance requests from regular browsers that expect HTML pages.
This package provides a solution that can be used in Laravel based applications to refuse serving HTTP requests from clients that are not ready to handle JSON based responses.
More ... Post a comment See comments (0) Trackbacks (0)