You've already seen how to check for a 404 error when a URL doesn't exist.
您已经看到了当 URL 不存在时应该如何检查 404 错误。
To check if the URL has been stored in the cookie store, use the following code to print out each cookie in the store.
为了检查缓存存储中是否存储了URL,您可以使用接下来的代码来打印存储中的每一个缓存。
If this turns into a common problem — perhaps a certain script or servlet is offline quite a bit — you might want to check for the URL before making a full GET or POST request.
如果这变成一个常见的问题——可能是缺少了一个特定的脚本或servlet——那么您就可能会希望在生成完整的GET或POST请求之前来检查这个URL。
应用推荐