Skip to content

Commit 147f7fc

Browse files
authored
fix api address
1 parent bf3fddc commit 147f7fc

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/Api.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
77
*/
88
class Api
99
{
10-
/**
11-
* @var string
12-
*/
13-
protected $_apiAddress = 'http://127.0.0.1:3232';
14-
1510
/**
1611
* @var array
1712
*/
@@ -61,7 +56,7 @@ public function trigger($channels, $event, $data, $socket_id = null)
6156
}
6257
$post_value = json_encode($post_params);
6358
$query_params['body_md5'] = md5($post_value);
64-
$ch = $this->createCurl($this->_apiAddress, $s_url, 'POST', $query_params);
59+
$ch = $this->createCurl($this->_settings['api_address'], $s_url, 'POST', $query_params);
6560
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_value);
6661
$response = $this->execCurl($ch);
6762
if ($response['status'] === 200) {
@@ -209,7 +204,7 @@ public static function arrayImplode($glue, $separator, $array)
209204

210205
public function get($path, $params = array())
211206
{
212-
$ch = $this->createCurl($this->_apiAddress, $this->_settings['base_path'] . $path, 'GET', $params);
207+
$ch = $this->createCurl($this->_settings['api_address'], $this->_settings['base_path'] . $path, 'GET', $params);
213208

214209
$response = $this->execCurl($ch);
215210

0 commit comments

Comments
 (0)