freyo / qcloud-apigateway-http
Installs: 8 048
Dependents: 1
Suggesters: 0
Security: 0
Stars: 5
Watchers: 1
Forks: 2
Open Issues: 0
Requires
- php: ^7.1.3
- ext-json: *
- guzzlehttp/guzzle: ~6.0
- monolog/monolog: ~1.22
- pimple/pimple: ^3.0
- symfony/http-foundation: ^4.1
Requires (Dev)
- mockery/mockery: ^1.0
- phpunit/phpunit: >=6.0.0
README
Tencent Cloud API Gateway PHP SDK
Requirement
- PHP >= 7.1.3
- Composer
- openssl 拓展
Installation
$ composer require freyo/qcloud-apigateway-http -vvv
Usage
<?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);
License
The MIT License (MIT). Please see License File for more information.