Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Override the JHttp contructor to use JHttpTransportStream. #1024

Closed
wants to merge 7 commits into
from
@@ -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

elinw Mar 25, 2012

Contributor

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

@nprasath002

nprasath002 Apr 5, 2012

Contributor

Done.
Thanks

// Make sure the user agent string is defined.
$this->options->def('userAgent', 'JGitHub/2.0');