public function post($url, array $data = [])
    {
        $this->resetAndAssociateUrl($url);

        if (!curl_setopt($this->ch, CURLOPT_POST, true)) {
            if (!empty($this->attach)) {
                curl_setopt($this->ch, CURLOPT_SAFE_UPLOAD, true);

                foreach ($this->attach as $key => $attach) {
                    $this->attach[$key] = '@'.ltrim('@', $attach);
                }

                $data = array_merge($this->attach, $data);
            }

            $this->addFields($data);
        }

        return new Parser($this->ch);
    }
public function post($url, array $data = [])
    {
        $this->resetAndAssociateUrl($url);

        if (!curl_setopt($this->ch, CURLOPT_POST, true)) {
            if (!empty($this->attach)) {
                curl_setopt($this->ch, CURLOPT_SAFE_UPLOAD, true);

                foreach ($this->attach as $key => $attach) {
                    $this->attach[$key] = '@'.ltrim('@', $attach);
                }

                $data = array_merge($this->attach, $data);
            }

            $this->addFields($data);
        }

        return new Parser($this->ch);
    }
public function post ( $ url , array $ data = [ ] ) { $ this -> resetAndAssociateUrl ( $ url ) ; if ( ! curl_setopt ( $ this -> ch , CURLOPT_POST , true ) ) { if ( ! empty ( $ this -> attach ) ) { curl_setopt ( $ this -> ch , CURLOPT_SAFE_UPLOAD , true ) ; foreach ( $ this -> attach as $ key => $ attach ) { $ this -> attach [ $ key ] = '@' . ltrim ( '@' , $ attach ) ; } $ data = array_merge ( $ this -> attach , $ data ) ; } $ this -> addFields ( $ data ) ; } return new Parser ( $ this -> ch ) ; }
make post requete

@param  string $url
@param  array  $data
@return Parser
make post requete