Open realityking opened 11 years ago
This would be very useful. Our OAuth classes take an application object just to handle sending a redirect, which really isn't ideal (or even necessary). Http should handle the response / redirect, IMO.
By Http do you mean you current Http package?
I think it should be part of a refactored Http package. Our current Http package is more for getting/posting remote data, don't you think?
Right our currently one is an abstraction around curl/fopen/sockets. Maybe we should rename it but I wouldn't want to mix that with the abstraction for HTTP Response (and Request?) handling.
We should look into pulling HTTP Response handling into its own class. This will make it easier to use some of our libraries independently (I'm think about the OAuth classes in particular)
The CMS has a Response class (https://github.com/joomla/joomla-cms/blob/master/libraries/joomla/environment/response.php), it was dropped from the platform because it relied completely on static methods.
Symfony2's Response class (main file is https://github.com/symfony/HttpFoundation/blob/master/Response.php) is kinda hovering over this discussion. Unfortunately it has a typehint to the Request class (however not a hard dependency)