Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Reference » System Procedures » System procedures

sa_server_option system procedure Next Page

sa_set_http_header system procedure


Permits a web service to set an HTTP header in the result.

Syntax

sa_set_http_header(
fldname,
val
)

Arguments
Remarks

Setting the special header field @HTTPSTATUS sets the status code returned with the request. The status code is also known as the response code. For example, the following command sets the status code to 404 Not Found.

CALL dbo.sa_set_http_header( '@HTTPSTATUS', '404' );

The body of the error message is inserted automatically. Only valid HTTP error codes can be used. Setting the status to an invalid code causes a SQL error.

Permissions

None

Side effects

None

See also
Example

The following example sets the Content-Type header field to text/html.

CALL dbo.sa_set_http_header( 'Content-Type', 'text/html' );