src/Traits/BuildRequest.php
public function buildPostRequest($uri, $query, $param, $headers = [], $isAsync = false)
    {
        $query_param = array_merge(['xh' => $this->stu_id], $query);
        $post = [
            'query' => $query_param,
            'headers' => $headers,
            'form_params' => $param,
        ];

        //If opened cookie cache
        if ($this->cacheCookie) {
            $post['cookies'] = $this->getCookie();
        }

        //If use getAll(), use the Async request.
        return $isAsync
            ? $this->client->postAsync($uri, $post)
            : $this->client->post($uri, $post);
    }
public function buildPostRequest($uri, $query, $param, $headers = [], $isAsync = false)
    {
        $query_param = array_merge(['xh' => $this->stu_id], $query);
        $post = [
            'query' => $query_param,
            'headers' => $headers,
            'form_params' => $param,
        ];

        //If opened cookie cache
        if ($this->cacheCookie) {
            $post['cookies'] = $this->getCookie();
        }

        //If use getAll(), use the Async request.
        return $isAsync
            ? $this->client->postAsync($uri, $post)
            : $this->client->post($uri, $post);
    }
public function buildPostRequest ( $ uri , $ query , $ param , $ headers = [ ] , $ isAsync = false ) { $ query_param = array_merge ( [ 'xh' => $ this -> stu_id ] , $ query ) ; $ post = [ 'query' => $ query_param , 'headers' => $ headers , 'form_params' => $ param , ] ; //If opened cookie cache if ( $ this -> cacheCookie ) { $ post [ 'cookies' ] = $ this -> getCookie ( ) ; } //If use getAll(), use the Async request. return $ isAsync ? $ this -> client -> postAsync ( $ uri , $ post ) : $ this -> client -> post ( $ uri , $ post ) ; }
Build the POST request.

@param $uri
@param $query
@param $param
@param array $headers A array of headers.
@param bool $isAsync If use getAll(),  by Async request.
@return mixed
Build the POST request .