add Http service

This commit is contained in:
Jaeger
2017-09-22 02:38:46 +08:00
parent 2013e4d2b0
commit 042c10cdea
7 changed files with 87 additions and 2 deletions

View File

@@ -0,0 +1,28 @@
<?php
/**
* Created by PhpStorm.
* User: Jaeger <JaegerCode@gmail.com>
* Date: 2017/9/22
*/
namespace QL\Services;
use Jaeger\GHttp;
use QL\QueryList;
class HttpService
{
public static function get(QueryList $ql,$url,$args = null,$otherArgs = [])
{
$html = GHttp::get($url,$args,$otherArgs);
$ql->setHtml($html);
return $ql;
}
public static function post(QueryList $ql,$url,$args = null,$otherArgs = [])
{
$html = GHttp::post($url,$args,$otherArgs);
$ql->setHtml($html);
return $ql;
}
}