You are here

function restws_terminate_request in RESTful Web Services 7.2

Terminates the current request with the given status code and message.

Parameters

$status_message: (optional) The status message (including the status code) to return via the HTTP Status header.

$message: (optional) A message displayed as body of the response.

2 calls to restws_terminate_request()
restws_handle_request in ./restws.module
Handles a request.
restws_page_callback in ./restws.module
Menu page callback.

File

./restws.module, line 569
RESTful web services module.

Code

function restws_terminate_request($status_message = NULL, $message = NULL) {
  if (!empty($message)) {
    echo $message;
  }
  if (!empty($status_message)) {
    drupal_add_http_header('Status', $status_message);
  }
  drupal_page_footer();
  exit;
}