|
|
|
|
WebserviceWriteCustomHTTPCode (Function) In french: WebserviceEcritCodeHTTPPersonnalisé
Not available
Specifies the custom HTTP code that will be returned when the execution of the REST web service function is completed. This function allows you to specify any code between 100 and 599, including the following return codes: - 2xx codes for Successful responses.
- 3xx codes for Redirections.
- 4xx codes for Client errors.
- 5xx codes for Server errors.
// Indicates a token error WebserviceWriteCustomHTTPCode("498 Invalid Token")
Syntax
WebserviceWriteCustomHTTPCode(<HTTP code and description> [, <Additional information>])
<HTTP code and description>: Character string HTTP code and its description, returned by the current web service call. The expected format is as follows:
<HTTP code> <Description> For example: "498 Invalid Token". Supported codes range from 100 to 599. <Additional information>: Optional character string Additional information required by some return codes. The return codes are as follows:- 201 (Created): optional information: Address of added information.
- 301 (Moved Permanently): required information: Redirection address.
- 302 (Moved Temporarily): required information: Redirection address.
- 4xx and 5xx: required information: Text of the error returned to the client. The text will be converted to UTF-8.
Remarks - This function is useful when the REST web service call must return a non-standard code not supported by WebserviceWriteHTTPCode.
- This function is only available when calling a function that processes a REST web service request. In all other cases, the function causes an error.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|