Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Extend Request.php to include Http Proxy support

Extended Request.php to allow for configurable Http Proxy support when using 'context' format. See http://www.php.net/manual/en/function.stream-context-create.php#92586
  • Loading branch information...
commit 705258038e45284cf8aa3c985c0dd740304f19ad 1 parent ddc1dc1
@ericcholis ericcholis authored nateabele committed
Showing with 5 additions and 2 deletions.
  1. +5 −2 net/http/Request.php
View
7 net/http/Request.php
@@ -76,7 +76,8 @@ public function __construct(array $config = array()) {
'headers' => array(),
'body' => null,
'auth' => null,
- 'method' => 'GET'
+ 'method' => 'GET',
+ 'proxy' => null
);
$config += $defaults;
parent::__construct($config);
@@ -211,12 +212,14 @@ public function to($format, array $options = array()) {
'username' => $this->username,
'password' => $this->password,
'headers' => array(),
+ 'proxy' => $this->proxy,
'body' => null,
'version' => $this->version,
'ignore_errors' => isset($this->_config['ignore_errors'])
? $this->_config['ignore_errors'] : true,
'follow_location' => isset($this->_config['follow_location'])
- ? $this->_config['follow_location'] : true
+ ? $this->_config['follow_location'] : true,
+ 'request_fulluri' => isset($this->proxy)
);
$options += $defaults;
Please sign in to comment.
Something went wrong with that request. Please try again.