public function maybeMoveParametersToBody()
  {
    if ($this->getRequestMethod() == "POST" && empty($this->postBody)) {
      $this->setRequestHeaders(
          array(
            "content-type" =>
                "application/x-www-form-urlencoded; charset=UTF-8"
          )
      );
      $this->setPostBody($this->buildQuery($this->queryParams));
      $this->queryParams = array();
    }
  }
public function maybeMoveParametersToBody()
  {
    if ($this->getRequestMethod() == "POST" && empty($this->postBody)) {
      $this->setRequestHeaders(
          array(
            "content-type" =>
                "application/x-www-form-urlencoded; charset=UTF-8"
          )
      );
      $this->setPostBody($this->buildQuery($this->queryParams));
      $this->queryParams = array();
    }
  }
public function maybeMoveParametersToBody ( ) { if ( $ this -> getRequestMethod ( ) == "POST" && empty ( $ this -> postBody ) ) { $ this -> setRequestHeaders ( array ( "content-type" => "application/x-www-form-urlencoded; charset=UTF-8" ) ) ; $ this -> setPostBody ( $ this -> buildQuery ( $ this -> queryParams ) ) ; $ this -> queryParams = array ( ) ; } }
If we're POSTing and have no body to send, we can send the query
parameters in there, which avoids length issues with longer query
params.
If we re POSTing and have no body to send we can send the query parameters in there which avoids length issues with longer query params .