Skip to content

Releases: encryptorcode/php-server-utils

v1.0.1: A few issue fixes

08 Sep 13:12
Compare
Choose a tag to compare
Response headers were still being sent even after the Response->respond() method was called.
Problem: It was causing an error if using echo in the user code.
Solution: Updated Response->respond() method to exit after the response is sent causing the execution to end immidieately for a given request.

Some servers are not supporting HTTP Methods except for GET and POST
Problem: Need a way to send PUT, PATCH and DELETE as they are commonly used Http Methods
Solution: Supported a header X-HTTP-METHOD-OVERRIDE whose value can be the HTTP method you need to send. This can be achieved using http POST request too.# On branch master

v1.0.0: Request and Response objects added

11 May 15:19
Compare
Choose a tag to compare
* Request object can be used to fetch query params, headers, cookies, url and request method
* Response object can be used to send a response by setting the response data which will be echoed and status
* RedirectResponse can be used to redirect the page to another location
* All the classes uses static methods that makes it simpler to obtain data without needing to initialize anything