Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php namespace Phabricator\Client\Guzzle; |
||
27 | public function request($url, $requestData) { |
||
28 | if(!class_exists('GuzzleHttp\Client')) { |
||
29 | throw new RuntimeException('The guzzle client is not installed. Please install uzzlehttp/guzzle'); |
||
30 | } |
||
31 | |||
32 | $client = new Client(); |
||
33 | |||
34 | //We do not care exceptions, this will handled by the user |
||
35 | $response = $client->request('POST', $url, ['form_params' => $requestData]); |
||
36 | |||
37 | return $response->getBody()->getContents(); |
||
38 | } |
||
39 | |||
42 |