Override the JHttp contructor to use JHttpTransportStream. #1024

wants to merge 7 commits into


None yet

4 participants


JHttp instantiates a JHttpTransportSocket object which does not handle Github's POST, DELETE, PATCH Requests. A workaround is to override the contrcutor in JGithubHttp to instantiate a JHttpTransportStream Object

Joomla! member

Why the change of approach from #1009? Also the code style is off.


Hi realityking.
Finally i got the code style right.
In my IDE the new code is algined here it shows one tab off.
I deleted the earlier fork to start fresh (Still testing in Github)
Please close that pull request
Sorry for the trouble

@elinw elinw commented on the diff Mar 25, 2012
@@ -46,8 +46,9 @@ class JGithubHttp extends JHttp
public function __construct(JRegistry $options = null, JHttpTransport $transport = null)
- // Call the JHttp constructor to setup the object.
- parent::__construct($options, $transport);
+ // Override the JHttp contructor to use JHttpTransportStream.
+ $this->options = isset($options) ? $options : new JRegistry;
+ $this->transport = isset($transport) ? $transport : new JHttpTransportStream($this->options);
elinw Mar 25, 2012

You need to use tabs not spaces to indent these three lines.

unknown added some commits Apr 5, 2012

This has been revamped to use a JHttpFactory class for wiring up the transport so I'm gonna close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment