com.HTTPServiceRequest.sendResponse

Sends and HTTP response without body.

Syntax

sendResponse(
   code INTEGER,
   desc STRING )
  1. code is the status code of the response.
  2. desc is the description of the response.

Usage

The sendResponse() method performs the HTTP response by sending the a status (code) and description (desc), followed by the headers previously set, without a body.

If the request failed to be read, its content will be discarded; for example, when a request is not well formatted.

If the description is NULL, a default description according to the status code is sent.

The body of the request is discarded.

New incoming requests can be retrieved again with the com.WebServiceEngine.GetHTTPServiceRequest() method.

In case of error, the method throws an exception and sets the STATUS variable with the appropriate error number.