Conditions | 2 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
61 | public function Request($method, $url, $params){ |
||
62 | $params = array_merge($params, $this->params); |
||
63 | $options = array( |
||
64 | 'form_params'=>$params, |
||
65 | 'headers'=>[ |
||
66 | 'Content-Type'=>'application/x-www-form-urlencoded', |
||
67 | ] |
||
68 | ); |
||
69 | try { |
||
70 | $response = $this->client->request($method, $url, $options); |
||
71 | return json_decode($response->getBody()->getContents(),true); |
||
72 | } catch (GuzzleException $e) { |
||
73 | echo $e->getMessage(); |
||
74 | } |
||
78 |