private function initiatePost($url, $params)
    {
        $ch = curl_init($this->host.'/'.$url);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authentication: Token ". $this->token));
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
        return $ch;
    }
private function initiatePost($url, $params)
    {
        $ch = curl_init($this->host.'/'.$url);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authentication: Token ". $this->token));
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
        return $ch;
    }
private function initiatePost ( $ url , $ params ) { $ ch = curl_init ( $ this -> host . '/' . $ url ) ; curl_setopt ( $ ch , CURLOPT_HTTPHEADER , array ( "Authentication: Token " . $ this -> token ) ) ; curl_setopt ( $ ch , CURLOPT_POST , 1 ) ; curl_setopt ( $ ch , CURLOPT_RETURNTRANSFER , 1 ) ; curl_setopt ( $ ch , CURLOPT_POSTFIELDS , http_build_query ( $ params ) ) ; return $ ch ; }
Initiates curl session for POST method

@param string $url   Relative url for the request
@param array $params Parameters for the request
@return resource
Initiates curl session for POST method