protected function buildParams()
    {
            if ($this->isPostMethod()) {
                $params = $this->params;
                if ($this->isJsonRequest()) {
                    return $this
                        ->setOption('content', $params = json_encode($params))
                        ->setHeader('Content-Type', 'application/json')
                        ->setHeader('Content-Length', strlen($params));
                }

                if (!empty($params)) {
                    if (!is_string($params)) {
                        $params = http_build_query($params);
                    }

                    return $this
                        ->setOption('content', $params)
                        ->setHeader('Content-Type', 'application/x-www-form-urlencoded')
                        ->setHeader('Content-Length', strlen($params));
                }

                return $this;
            }

            return $this->buildUrl();
    }