|
@@ 110-122 (lines=13) @@
|
| 107 |
|
* @param $password |
| 108 |
|
* @return Response |
| 109 |
|
*/ |
| 110 |
|
public static function sendGetWithAuth($uri, array $getParams=[], array $postParams=[], $user, $password) |
| 111 |
|
{ |
| 112 |
|
|
| 113 |
|
$requestHelper = new RequestHelper(); |
| 114 |
|
$guzzle = new Client(); |
| 115 |
|
$httpClient = new HTTPClient($guzzle,$requestHelper); |
| 116 |
|
$httpHelper = new HttpHelper($httpClient); |
| 117 |
|
$response = $httpHelper->sendGetWithAuth($uri, $getParams, $postParams, $user, $password); |
| 118 |
|
|
| 119 |
|
return $response; |
| 120 |
|
|
| 121 |
|
|
| 122 |
|
} |
| 123 |
|
|
| 124 |
|
/** |
| 125 |
|
* @param $uri |
|
@@ 149-158 (lines=10) @@
|
| 146 |
|
* @param $password |
| 147 |
|
* @return Response |
| 148 |
|
*/ |
| 149 |
|
public static function sendPostWithAuth($uri, array $getParams=[], array $postParams=[], $user, $password) |
| 150 |
|
{ |
| 151 |
|
$requestHelper = new RequestHelper(); |
| 152 |
|
$guzzle = new Client(); |
| 153 |
|
$httpClient = new HTTPClient($guzzle,$requestHelper); |
| 154 |
|
$httpHelper = new HttpHelper($httpClient); |
| 155 |
|
$response = $httpHelper->sendPostWithAuth($uri, $getParams, $postParams, $user, $password); |
| 156 |
|
|
| 157 |
|
return $response; |
| 158 |
|
} |
| 159 |
|
|
| 160 |
|
/** |
| 161 |
|
* @param $uri |