original_string: protected function configureBody($body){
          $upload = $this->getUpload();
          switch ($this->method) {
              case self::HTTP_GET:
                  if (!$upload){
                      if (is_array($body) || is_object($body)){
                          $queryParams = http_build_query($body);
                      } else {
                          $queryParams = $body;
                      }
                      if (!empty($body)){
                          if (strpos($this->url, "?") === false) {
                              $queryParams = "?".$queryParams;
                          } else {
                              $queryParams = "&".$queryParams;
                          }
                          return $this->configureUrl($this->url.$queryParams);
                      }
                      break;
                  }
              default:
                  if ($upload){
                      $this->addHeader('Content-Type','multipart/form-data');
                  }
                  return $this->addCurlOption(CURLOPT_POSTFIELDS, $body);
          }
      }
code: protected function configureBody($body){
          $upload = $this->getUpload();
          switch ($this->method) {
              case self::HTTP_GET:
                  if (!$upload){
                      if (is_array($body) || is_object($body)){
                          $queryParams = http_build_query($body);
                      } else {
                          $queryParams = $body;
                      }
                      if (!empty($body)){
                          if (strpos($this->url, "?") === false) {
                              $queryParams = "?".$queryParams;
                          } else {
                              $queryParams = "&".$queryParams;
                          }
                          return $this->configureUrl($this->url.$queryParams);
                      }
                      break;
                  }
              default:
                  if ($upload){
                      $this->addHeader('Content-Type','multipart/form-data');
                  }
                  return $this->addCurlOption(CURLOPT_POSTFIELDS, $body);
          }
      }
code_tokens: protected function configureBody ( $ body ) { $ upload = $ this -> getUpload ( ) ; switch ( $ this -> method ) { case self :: HTTP_GET : if ( ! $ upload ) { if ( is_array ( $ body ) || is_object ( $ body ) ) { $ queryParams = http_build_query ( $ body ) ; } else { $ queryParams = $ body ; } if ( ! empty ( $ body ) ) { if ( strpos ( $ this -> url , "?" ) === false ) { $ queryParams = "?" . $ queryParams ; } else { $ queryParams = "&" . $ queryParams ; } return $ this -> configureUrl ( $ this -> url . $ queryParams ) ; } break ; } default : if ( $ upload ) { $ this -> addHeader ( 'Content-Type' , 'multipart/form-data' ) ; } return $ this -> addCurlOption ( CURLOPT_POSTFIELDS , $ body ) ; } }
docstring: Configure the Body to be set on the cURL Resource
  @param $body
  @return bool
docstring_tokens: Configure the Body to be set on the cURL Resource