curl_re->curl

pull/187/head
qkqpttgf 2021-01-11 10:03:54 +08:00 committed by GitHub
parent 4e434ede6b
commit b8c4cc1312
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -348,7 +348,7 @@ function getfunctioncode($HW_urn, $HW_key, $HW_secret)
' . '/' . $bucket . '/' . $path;
$signature = base64_encode(hash_hmac('sha1', $StringToSign, $HW_secret, true));
$response = curl_request($url, false, [ 'Authorization' => 'OBS ' . $HW_key . ':' . $signature, 'x-obs-date' => $date, 'Content-Type' => '' ]);
$response = curl('GET', $url, false, [ 'Authorization' => 'OBS ' . $HW_key . ':' . $signature, 'x-obs-date' => $date, 'Content-Type' => '' ]);
//if ($response['stat']==200) return $response['body'];
if ($response['stat']==0) return json_encode( [ 'error_code' => 'Network', 'error_msg' => 'Network error in getting code.' ] );
else return $response['body'];