protected function prepareParsedBody()
    {
        if ($this->method == self::METHOD_POST &&
            in_array($this->getMediaType(), ['application/x-www-form-urlencoded', 'multipart/form-data'])
        ) {
            return $_POST;
        } else {
            $body = (string)$this->getBody();

            switch ($this->getMediaType()) {
                case 'application/json':
                    return json_decode($body, true);

                case 'application/xml':
                    return simplexml_load_string($body);

                default:
                    parse_str($body, $output);

                    return $output;
            }
        }
    }