Permits a web service to set an HTTP header in the result.
sa_set_http_header ( field-name, value )
None.
“sa_set_http_option system procedure”
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.