TaoLer/app/common/lib/facade/HttpHelper.php
2023-02-10 14:09:38 +08:00

29 lines
856 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace app\common\lib\facade;
use think\Facade;
use think\response\Json;
/**
* @method static \app\common\lib\HttpHelper withHost(string $url = 'http://api.aieok.com') 携带指定接口
* @method static \app\common\lib\HttpHelper withHeaders(array $data = []) 携带请求头
* @method static \app\common\lib\HttpHelper get(string $url, array $data = []) GET请求
* @method static \app\common\lib\HttpHelper post(string $url, array $data = []) POST请求
* @method static array toArray() 返回ARRAY数据
* @method static bool ok() 服务器200
*/
class HttpHelper extends Facade
{
/**
* 获取当前Facade对应类名或者已经绑定的容器对象标识
* @access protected
* @return string
*/
protected static function getFacadeClass()
{
return 'app\common\lib\HttpHelper';
}
}