@@ -21,6 +21,9 @@ discard block |
||
21 | 21 | $last_info = null, |
22 | 22 | $proxy = null; // host:port |
23 | 23 | |
24 | + /** |
|
25 | + * @param string $method |
|
26 | + */ |
|
24 | 27 | protected static function request($method, $url, $data=[], array $headers=[], $data_as_json=false, $username=null, $password = null){ |
25 | 28 | preg_match('/.+(?::([0-9]+))\/?/i', $url, $match); |
26 | 29 | $port = count($match) > 1 ? $match[1] : 80; |
@@ -89,6 +92,9 @@ discard block |
||
89 | 92 | return $value===null ? static::$json_data : static::$json_data = $value; |
90 | 93 | } |
91 | 94 | |
95 | + /** |
|
96 | + * @param string $headers |
|
97 | + */ |
|
92 | 98 | protected static function trasformRawHeaders($headers) { |
93 | 99 | foreach (explode("\r\n", trim($headers)) as $line) { |
94 | 100 | if (empty($line)) continue; |