Permits a web service to set an HTTP header in the result.
sa_set_http_header( fldname, val )
fldname Use this CHAR(128) parameter to specify a string containing the name of one of the HTTP header fields.
val Use this LONG VARCHAR parameter to specify the value to which the named parameter should be set.
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.
None
None
The following example sets the Content-Type header field to text/html.
CALL dbo.sa_set_http_header( 'Content-Type', 'text/html' ); |
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |