Permits a Web service to set an HTTP header in the result.
sa_set_http_header ( field-name, value )
DBA authority required. Users without DBA authority must be granted EXECUTE permission to run the stored 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.