|
10 | 10 | require_once realpath ( dirname ( __FILE__ ) . '/sls.proto.php' ); |
11 | 11 | require_once realpath ( dirname ( __FILE__ ) . '/protocolbuffers.inc.php' ); |
12 | 12 |
|
13 | | -if(!defined('API_VERSION')) |
14 | | - define('API_VERSION', '0.6.0'); |
15 | | -if(!defined('USER_AGENT')) |
16 | | - define('USER_AGENT', 'log-php-sdk-v-0.6.0'); |
| 13 | +if(!defined('SLS_API_VERSION')) |
| 14 | + define('SLS_API_VERSION', '0.6.0'); |
| 15 | +if(!defined('SLS_USER_AGENT')) |
| 16 | + define('SLS_USER_AGENT', 'log-php-sdk-v-0.6.0'); |
17 | 17 |
|
18 | 18 | /** |
19 | 19 | * Aliyun_Log_Client class is the main class in the SDK. It can be used to |
@@ -153,7 +153,7 @@ protected function getHttpResponse($method, $url, $body, $headers) { |
153 | 153 | foreach ( $headers as $key => $value ) |
154 | 154 | $request->add_header ( $key, $value ); |
155 | 155 | $request->set_method ( $method ); |
156 | | - $request->set_useragent(USER_AGENT); |
| 156 | + $request->set_useragent(SLS_USER_AGENT); |
157 | 157 | if ($method == "POST" || $method == "PUT") |
158 | 158 | $request->set_body ( $body ); |
159 | 159 | $request->send_request (); |
@@ -225,7 +225,7 @@ private function send($method, $project, $body, $resource, $params, $headers) { |
225 | 225 | $headers ['Content-Type'] = ''; // If not set, http request will add automatically. |
226 | 226 | } |
227 | 227 |
|
228 | | - $headers ['x-log-apiversion'] = API_VERSION; |
| 228 | + $headers ['x-log-apiversion'] = SLS_API_VERSION; |
229 | 229 | $headers ['x-log-signaturemethod'] = 'hmac-sha1'; |
230 | 230 | if(strlen($credentials->getSecurityToken()) >0) |
231 | 231 | $headers ['x-acs-security-token'] = $credentials->getSecurityToken(); |
|
0 commit comments