@@ -142,18 +142,20 @@ public function _request($action, $protocol, $method, $request, RuntimeOptions $
142142 $ _request ->pathname = '/ ' ;
143143 $ accessKeyId = $ this ->getAccessKeyId ();
144144 $ accessKeySecret = $ this ->getAccessKeySecret ();
145- $ _request ->query = RpcUtils::query ([
146- 'Action ' => $ action ,
147- 'Format ' => 'json ' ,
148- 'RegionId ' => $ this ->_regionId ,
149- 'Timestamp ' => RpcUtils::getTimestamp (),
150- 'Version ' => '2020-02-12 ' ,
151- 'SignatureMethod ' => 'HMAC-SHA1 ' ,
152- 'SignatureVersion ' => '1.0 ' ,
153- 'SignatureNonce ' => Utils::getNonce (),
154- 'AccessKeyId ' => $ accessKeyId ,
155- $ request ,
156- ]);
145+ $ _request ->query = RpcUtils::query (array_merge (
146+ [
147+ 'Action ' => $ action ,
148+ 'Format ' => 'json ' ,
149+ 'RegionId ' => $ this ->_regionId ,
150+ 'Timestamp ' => RpcUtils::getTimestamp (),
151+ 'Version ' => '2020-02-12 ' ,
152+ 'SignatureMethod ' => 'HMAC-SHA1 ' ,
153+ 'SignatureVersion ' => '1.0 ' ,
154+ 'SignatureNonce ' => Utils::getNonce (),
155+ 'AccessKeyId ' => $ accessKeyId ,
156+ ],
157+ $ request
158+ ));
157159 $ _request ->headers = [
158160 'host ' => RpcUtils::getHost ('ImageSearch ' , $ this ->_regionId , $ this ->_endpoint ),
159161 'user-agent ' => $ this ->getUserAgent (),
@@ -211,7 +213,7 @@ public function searchImageByPicAdvance(SearchImageByPicAdvanceRequest $request,
211213 'product ' => 'ImageSearch ' ,
212214 'regionId ' => $ this ->_regionId ,
213215 ]);
214- $ authResponse = $ this -> authClient ->authorizeFileUpload ($ authRequest , $ runtime );
216+ $ authResponse = $ authClient ->authorizeFileUpload ($ authRequest , $ runtime );
215217 $ ossConfig = new \AlibabaCloud \SDK \OSS \OSS \Config ([
216218 'accessKeyId ' => $ authResponse ->accessKeyId ,
217219 'accessKeySecret ' => $ accessKeySecret ,
@@ -240,7 +242,7 @@ public function searchImageByPicAdvance(SearchImageByPicAdvanceRequest $request,
240242 ]);
241243 $ ossRuntime = new \AlibabaCloud \SDK \OSS \OSS \RuntimeOptions ([]);
242244 RpcUtils::convert ($ runtime , $ ossRuntime );
243- $ this -> ossClient ->postObject ($ uploadRequest , $ ossRuntime );
245+ $ ossClient ->postObject ($ uploadRequest , $ ossRuntime );
244246 $ searchImageByPicreq = new SearchImageByPicRequest ([]);
245247 RpcUtils::convert ($ request , $ searchImageByPicreq );
246248 $ searchImageByPicreq ->picContent = 'http:// ' . $ authResponse ->bucket . '. ' . $ authResponse ->endpoint . '/ ' . $ authResponse ->objectKey . '' ;
@@ -275,7 +277,7 @@ public function addImageAdvance(AddImageAdvanceRequest $request, RuntimeOptions
275277 'product ' => 'ImageSearch ' ,
276278 'regionId ' => $ this ->_regionId ,
277279 ]);
278- $ authResponse = $ this -> authClient ->authorizeFileUpload ($ authRequest , $ runtime );
280+ $ authResponse = $ authClient ->authorizeFileUpload ($ authRequest , $ runtime );
279281 $ ossConfig = new \AlibabaCloud \SDK \OSS \OSS \Config ([
280282 'accessKeyId ' => $ authResponse ->accessKeyId ,
281283 'accessKeySecret ' => $ accessKeySecret ,
@@ -304,7 +306,7 @@ public function addImageAdvance(AddImageAdvanceRequest $request, RuntimeOptions
304306 ]);
305307 $ ossRuntime = new \AlibabaCloud \SDK \OSS \OSS \RuntimeOptions ([]);
306308 RpcUtils::convert ($ runtime , $ ossRuntime );
307- $ this -> ossClient ->postObject ($ uploadRequest , $ ossRuntime );
309+ $ ossClient ->postObject ($ uploadRequest , $ ossRuntime );
308310 $ addImagereq = new AddImageRequest ([]);
309311 RpcUtils::convert ($ request , $ addImagereq );
310312 $ addImagereq ->picContent = 'http:// ' . $ authResponse ->bucket . '. ' . $ authResponse ->endpoint . '/ ' . $ authResponse ->objectKey . '' ;
0 commit comments