User tests: Successful: Unsuccessful:
Pull Request resolves # .
Currently, creating a HTTP object in Joomla to make http requests requires repetitive boilerplate code like below across our code base to populate userAgent:
$version = new Version();
$httpOption = new Registry();
$httpOption->set('userAgent', $version->getUserAgent('Joomla', true, false));
try {
$http = (new HttpFactory())->getHttp($httpOption);
$response = $http->get($url);
} catch (\RuntimeException) {
$response = null;
}It is even more boilerplate code if we want to support proxy options ( Outbound Proxy was supported when we use Joomla CMS Http package, but was lost when we migrated our code to use framework Http package)
This PRs address that limitation by:
I made a sample change to LanguagesModel to show how to use the Http factory to create http object (the new way). If this PR is accepted, I will make a new PR to convert all existing code in Joomla to use the new http factory to create http object.
Please select:
No documentation changes for guide.joomla.org needed
Pull Request link for manual.joomla.org:
| Status | New | ⇒ | Pending |
| Category | ⇒ | Administration com_installer Libraries |
| Labels |
Added:
PR-6.2-dev
|
||