Lndj\Traits\BuildRequest::buildGetRequest PHP Метод

buildGetRequest() публичный Метод

Build the get request.
public buildGetRequest ( type | string $uri, type | array $param = [], type | array $headers = [], type | boolean $isAsync = false ) : type
$uri type | string
$param type | array
$headers type | array
$isAsync type | boolean
Результат type
    public function buildGetRequest($uri, $param = [], $headers = [], $isAsync = false)
    {
        $query_param = array_merge(['xh' => $this->stu_id], $param);
        $query = ['query' => $query_param, 'headers' => $headers];
        if ($this->cacheCookie) {
            $query['cookies'] = $this->getCookie();
        }
        //If use getAll(), use the Async request.
        return $isAsync ? $this->client->getAsync($uri, $query) : $this->client->get($uri, $query);
    }