HTTP 状态代码
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
服务器可以响应 HTTP POST
或 HTTP GET
请求而生成的 HTTP 状态代码:
200 OK
:成功的请求。
400 Bad Request
:无效参数(无效请求负载)。
403 Forbidden
:权限被拒绝(例如:无效的 API 密钥)。
429 Resource Exhausted
:资源配额不足或达到速率限制。
500 Internal Server Error
:内部服务器错误(重试您的请求)。
503 Service Unavailable
:不可用。
504 Gateway Timeout
:已超过截止时间(请重试您的请求)。
注意:收到失败的 HTTP 响应(即除 200 OK
以外的任何 HTTP 状态代码)的客户端必须进入退避模式。
收到 HTTP 状态代码 400 Bad Request
的可能原因:
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eThe server generates HTTP status codes like \u003ccode\u003e200 OK\u003c/code\u003e for success and various error codes (\u003ccode\u003e400\u003c/code\u003e, \u003ccode\u003e403\u003c/code\u003e, \u003ccode\u003e429\u003c/code\u003e, \u003ccode\u003e500\u003c/code\u003e, \u003ccode\u003e503\u003c/code\u003e, \u003ccode\u003e504\u003c/code\u003e) for different issues encountered during \u003ccode\u003ePOST\u003c/code\u003e or \u003ccode\u003eGET\u003c/code\u003e requests.\u003c/p\u003e\n"],["\u003cp\u003eClients receiving unsuccessful HTTP responses (any code other than \u003ccode\u003e200 OK\u003c/code\u003e) should enter back-off mode to avoid overwhelming the server.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003e400 Bad Request\u003c/code\u003e errors can arise from invalid arguments in requests to \u003ccode\u003efullHashes.find\u003c/code\u003e, \u003ccode\u003ethreatListUpdates.fetch\u003c/code\u003e, or \u003ccode\u003ethreatMatches.find\u003c/code\u003e methods, such as invalid hashes, empty update requests, or missing threat entry types.\u003c/p\u003e\n"]]],["The server responds to HTTP `POST` or `GET` requests with various status codes. `200 OK` indicates success. Errors include `400 Bad Request` for invalid input, `403 Forbidden` for permission issues, `429 Resource Exhausted` for quota/rate limits, `500` for internal errors, `503` for unavailability, and `504` for timeouts. A non-`200 OK` response requires clients to enter back-off mode. `400` errors may occur due to invalid hashes, empty update requests, or missing threat information.\n"],null,["# HTTP Status Codes\n\nHTTP status codes the server can generate in response to an HTTP `POST` or\nHTTP `GET` request:\n\n- `200 OK`: Successful request.\n- `400 Bad Request`: Invalid argument (invalid request payload).\n- `403 Forbidden`: Permission denied (e.g. invalid API key).\n- `429 Resource Exhausted`: Either out of resource quota or reaching rate limiting.\n- `500 Internal Server Error`: Internal server error (retry your request).\n- `503 Service Unavailable`: Unavailable.\n- `504 Gateway Timeout`: Deadline exceeded (retry your request).\n\n**Note** : Clients that receive an unsuccessful HTTP response (that is, any HTTP\nstatus code other than `200 OK`) must enter\n[back-off mode](/safe-browsing/v4/request-frequency#back-off-mode).\n\n\nPossible reasons for receiving HTTP status code `400 Bad Request`:\n\n- [fullHashes.find](/safe-browsing/reference/rest/v4/fullHashes/find): Invalid hash.\n- [threatListUpdates.fetch](/safe-browsing/reference/rest/v4/threatListUpdates/fetch): Empty update request, or invalid list configuration, or list does not exist for the requested configuration.\n- [threatMatches.find](/safe-browsing/reference/rest/v4/threatMatches/find): Threat entry type not set in threat info section of request."]]