Contents Index sa_server_option system procedure sa_set_http_option system procedure

ASA SQL Reference
  System Procedures and Functions
    System and catalog stored procedures

sa_set_http_header system procedure


Function 

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

Syntax 

sa_set_http_header (field-name, value)

Parameters 

field-name    A string containing the name of one of the HTTP header fields.

value    The value to which the named parameter should be set.

Permissions 

None.

Side affects 

None.

See also 

sa_set_http_option system procedure

Description 

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

Setting the special header field @HttpStatus sets the status code returned with the request. For example, the following command sets the status code to 404 Not Found.

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 an SQL error.


Contents Index sa_server_option system procedure sa_set_http_option system procedure