code: public function setEncoding($encoding)
  	{
  		$encoding = intval($encoding);
  
  		if ($encoding !== REQUEST::ENCODING_QUERY && $encoding !== REQUEST::ENCODING_JSON && $encoding !== REQUEST::ENCODING_RAW) {
  			throw new \InvalidArgumentException("Encoding [$encoding] not a known Request::ENCODING_* constant");
  		}
  
  		if ($encoding === Request::ENCODING_JSON && !$this->getHeader('Content-Type')) {
  			$this->setHeader('Content-Type', 'application/json');
  		}
  
  		$this->encoding = $encoding;
  
  		return $this;
  	}
docs: Set the encoding to use on the POST data, and (possibly) associated Content-Type headers
  
  @param int  $encoding  a Request::ENCODING_* constant