@@ -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 | $http_method = strtoupper($method); |
26 | 29 | $ch = curl_init($url); |
@@ -86,6 +89,9 @@ discard block |
||
86 | 89 | return $value===null ? static::$json_data : static::$json_data = $value; |
87 | 90 | } |
88 | 91 | |
92 | + /** |
|
93 | + * @param string $headers |
|
94 | + */ |
|
89 | 95 | protected static function trasformRawHeaders($headers,$url) { |
90 | 96 | foreach (explode("\r\n", trim($headers)) as $line) { |
91 | 97 | if (empty($line)) continue; |