PHP Classes

Laravel JSON Request Validation package blog

Recommend this page to a friend!

Latest Laravel JSON Request Validation package blog posts

  All package blogs All package blogs   Laravel JSON Request Validation Laravel JSON Request Validation   Blog Laravel JSON Request Validation package blog   Post article Post article  

1. How to Implement a Laravel JSON API that Only Allows Clients that Request JSON Responses

Updated on: 2021-03-15

Posted on:

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.


Blog More ...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)


  All package blogs All package blogs   Laravel JSON Request Validation Laravel JSON Request Validation   Blog Laravel JSON Request Validation package blog   Post article Post article