public function getPostBody()
    {
        $output = '';
        if ($this->isJson) {
            $jsonPretty = ($this->isJsonPretty ? JSON_PRETTY_PRINT : NULL);
            if (count($this->data) > 0) {
                $output = json_encode($this->data, $jsonPretty);
            }
        } elseif ($this->isXML) {
            $output = $this->data;
        } elseif (count($this->data) > 0) {
            $output = http_build_query($this->data);
        }

        return $output;
    }