original_string: public function send($code, $body = '')
      {
          if (!isset($this->codes[$code])) {
              $statusCode = 500;
              $body = 'API attempted to return an unknown HTTP status.';
          }
          // if the body wasn't defined, default to the inbuilt response
          if (!$body) $body = $this->codes[$code];
          header('HTTP/1.1 ' . $code . ' ' . $this->codes[$code]);
          header('Content-type: application/json');
          echo json_encode($body);
          exit;
      }
code: public function send($code, $body = '')
      {
          if (!isset($this->codes[$code])) {
              $statusCode = 500;
              $body = 'API attempted to return an unknown HTTP status.';
          }
          // if the body wasn't defined, default to the inbuilt response
          if (!$body) $body = $this->codes[$code];
          header('HTTP/1.1 ' . $code . ' ' . $this->codes[$code]);
          header('Content-type: application/json');
          echo json_encode($body);
          exit;
      }
code_tokens: public function send ( $ code , $ body = '' ) { if ( ! isset ( $ this -> codes [ $ code ] ) ) { $ statusCode = 500 ; $ body = 'API attempted to return an unknown HTTP status.' ; } // if the body wasn't defined, default to the inbuilt response if ( ! $ body ) $ body = $ this -> codes [ $ code ] ; header ( 'HTTP/1.1 ' . $ code . ' ' . $ this -> codes [ $ code ] ) ; header ( 'Content-type: application/json' ) ; echo json_encode ( $ body ) ; exit ; }
docstring: Output a JSON formatted response of the supplied body param, along with
  the supplied code param as the HTTP status code.
  
  @param int $code
  @param mixed $body
docstring_tokens: Output a JSON formatted response of the supplied body param along with the supplied code param as the HTTP status code .