以下为ChatGPT自动生成的解答,正确与否请自行判断。

BFE.devAI解答 - 前端面试问题
35. 请解释常见的HTTP response status code

常见的HTTP response status code有以下几种:

  1. 1xx: Informational(信息性状态码)
  • 100: Continue(继续)
  • 101: Switching Protocols(切换协议)
  1. 2xx: Success(成功状态码)
  • 200: OK(请求成功)
  • 201: Created(已创建)
  • 202: Accepted(已接受)
  • 204: No Content(无内容)
  1. 3xx: Redirection(重定向状态码)
  • 301: Moved Permanently(永久重定向)
  • 302: Found(临时重定向)
  • 304: Not Modified(未修改)
  1. 4xx: Client errors(客户端错误状态码)
  • 400: Bad Request(请求错误)
  • 401: Unauthorized(未授权)
  • 403: Forbidden(禁止访问)
  • 404: Not Found(未找到)
  1. 5xx: Server errors(服务器错误状态码)
  • 500: Internal Server Error(服务器内部错误)
  • 502: Bad Gateway(网关错误)
  • 503: Service Unavailable(服务不可用)
  • 504: Gateway Timeout(网关超时)

理解常见的HTTP response status code可以帮助你更好地了解请求和响应的过程,这对于前端开发来说是非常重要的。