Application.php
private function parseRequestBody()
	{
		$content_type = $this->getRequestHeader()->getContentType();
		if (strpos($content_type, 'application/json') !== false) {
			$this->requestBody = new JsonBody();
		} elseif (strpos($content_type, 'application/x-www-form-urlencoded') !== false) {
			$this->requestBody = new FormBody();
		} elseif (strpos($content_type, 'text/plain') !== false) {
			$this->requestBody = new PlainBody();
		} elseif (strpos($content_type, 'multipart/form-data') !== false) {
			$this->requestBody = new MultipartBody();
		} else {
			$this->requestBody = new HttpBody();
		}
	}
private function parseRequestBody()
	{
		$content_type = $this->getRequestHeader()->getContentType();
		if (strpos($content_type, 'application/json') !== false) {
			$this->requestBody = new JsonBody();
		} elseif (strpos($content_type, 'application/x-www-form-urlencoded') !== false) {
			$this->requestBody = new FormBody();
		} elseif (strpos($content_type, 'text/plain') !== false) {
			$this->requestBody = new PlainBody();
		} elseif (strpos($content_type, 'multipart/form-data') !== false) {
			$this->requestBody = new MultipartBody();
		} else {
			$this->requestBody = new HttpBody();
		}
	}
private function parseRequestBody ( ) { $ content_type = $ this -> getRequestHeader ( ) -> getContentType ( ) ; if ( strpos ( $ content_type , 'application/json' ) !== false ) { $ this -> requestBody = new JsonBody ( ) ; } elseif ( strpos ( $ content_type , 'application/x-www-form-urlencoded' ) !== false ) { $ this -> requestBody = new FormBody ( ) ; } elseif ( strpos ( $ content_type , 'text/plain' ) !== false ) { $ this -> requestBody = new PlainBody ( ) ; } elseif ( strpos ( $ content_type , 'multipart/form-data' ) !== false ) { $ this -> requestBody = new MultipartBody ( ) ; } else { $ this -> requestBody = new HttpBody ( ) ; } }
Setting up the request body parser
Setting up the request body parser