PHP code example of abelhalo / api-proxy
1. Go to this page and download the library: Download abelhalo/api-proxy library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
abelhalo / api-proxy example snippets
use AbelHalo\ApiProxy\ApiProxy;
$proxy = new ApiProxy;
// 返回值类型:object / array / string / json
$proxy->setReturnAs('object');
// 开启请求日志
$proxy->logger->enable();
// 请求方法:get / post / put / ...
$proxy->post($url, $params);