- PHP >= 7.1.3
- Composer
- openssl 鎷撳睍
$ composer require freyo/qcloud-apigateway-http -vvv
<?php
include 'vendor/autoload.php';
use Freyo\ApiGateway\Application;
$app = new Application([
'response_type' => 'array',
'secret_key' => 'your-secret-key',
'secret_id' => 'your-secret-id',
'region' => 'your-gateway-region', // e.g., ap-guangzhou
'log' => [
'file' => __DIR__ . DIRECTORY_SEPARATOR . 'apigateway.log',
'level' => 'debug',
],
'http' => [
'base_uri' => 'http://{service-id}.{region}.apigw.tencentcs.com',
// 'base_uri' => 'http://{service-id}.{region}.apigateway.myqcloud.com',
],
]);
$response = $app->base_client->httpGet('path/to');
var_dump($response);
The MIT License (MIT). Please see License File for more information.