Despite the apparent success of the code in Listing 13, there's still a problem — what if the server responds to your request and finishes processing, but reports an error?
虽然清单13中的代码看起来似乎不错,但是还有一个问题——如果服务器响应请求并完成了处理但是报告了一个错误怎么办?
For example, you've certainly entered a request for a URL, typed the URL incorrectly, and received a 404 error code to indicate a page is missing.
比方说,您肯定遇到过输入了错误的URL请求而得到404错误码的情形,它表示该页面不存在。
If the validation action fails, the DataPower Appliance will respond to the request with a failure message and the HTTP 500 error code back to the client that initially sent the XML document.
如果验证动作失败,DataPowerAppliance将以一条失败消息响应请求,并将HTTP 500错误码返回给最初发送XML文档的客户机。
The result and fault attributes provide code to be executed on successful completion of the request and error conditions, respectively.
result和faul t属性分别提供在成功完成请求和出现错误时要执行的代码。
On HTML devices, the request returns the actual error code so the browser can respond accordingly.
在HTML设备上,请求返回实际错误代码,以便浏览器能够相应地作出响应。
When an error occurs for such a device, the request returns the HTTP response code 200, indicating success, but the body of the page contains the error message.
在此类设备发生错误时,请求返回HTTP响应代码200,指示成功,但页的正文包含错误信息。
When an error occurs for such a device, the request returns the HTTP response code 200, indicating success, but the body of the page contains the error message.
在此类设备发生错误时,请求返回HTTP响应代码200,指示成功,但页的正文包含错误信息。
应用推荐