Notable PHP package: PHP JSON Response Class

Recommend this page to a friend!
  PHP Classes blog     Notable PHP package: ...   Post a comment   See comments (0)   Trackbacks (0)  

Author:

Updated on: 2019-10-14

Posted on: 2019-10-14

Viewers: 69 (October 2019 until May 2020)

Last month viewers: 2 (May 2020)

Categories: Notable Packages

HTTP requests need to have a response that uses status codes to let browsers or HTTP clients know if a request was handled successfully or some other outcome has happened.

HTTP status codes are numbers, which are usually not human friendly because they do not mean anything unless the developer looks up or remembers their meaning of all the HTTP status codes that you use in an application.

This class provides a more human friendly solution to issue HTTP status codes that consists in passing just the text message of the HTTP status, so the class automatically determines the HTTP status code numbers.

Read this article to learn more details about how this notable PHP package works.




The package PHP JSON Response Class is one of the few PHP packages that was considered notable recently because it does something that is worth paying attention.

The basic purpose is: Generate a HTTP request response in JSON format

Here follows in more detail what it does:

This class can generate a HTTP request response in JSON format.

It can take an a variable value as parameter and generates a JSON encoded string from that value to serve it as response for the current request.

The class can also take the string for the request status value and serves the respective HTTP response header being 200 for ok, 401 for unauthorized and 500 for exception.

Notable PHP packages can be often considered innovative. If this package is also innovative, it can be nominated to the PHP Innovation Award and the author may win prizes and recognition for sharing innovative packages.

If you also developed your own notable or innovative packages consider sharing them, so you can also earn more visibility for your package.



You need to be a registered user or login to post a comment

Login Immediately with your account on:

FacebookGmail
HotmailStackOverflow
GitHubYahoo


Comments:

No comments were submitted yet.



  PHP Classes blog     Notable PHP package: ...   Post a comment   See comments (0)   Trackbacks (0)  

For more information send a message to info at phpclasses dot org.