首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

401 Unauthorized

HTTP 401 Unauthorized客户端错误状态响应代码指示该请求尚未应用,因为它缺少目标资源的有效认证凭证。

此状态与包含有关如何正确授权信息的WWW-Authenticate标头一起发送。

这种状态与此类似403,但在这种情况下,身份验证是可能的。

状态

401 Unauthorized

响应示例

HTTP/1.1 401 Unauthorized 
Date: Wed, 21 Oct 2015 07:28:00 GMT
WWW-Authenticate: Basic realm="Access to staging site"

规范

规范

标题

RFC 7235,第3.1节:401未经授权

HTTP / 1.1:认证

浏览器兼容性

Feature

Chrome

Firefox

Edge

Internet Explorer

Opera

Safari

Basic Support

(Yes)

(Yes)

(Yes)

(Yes)

(Yes)

(Yes)

Feature

Android

Chrome for Android

Edge mobile

Firefox for Android

IE mobile

Opera Android

iOS Safari

Basic Support

(Yes)

(Yes)

(Yes)

(Yes)

(Yes)

(Yes)

(Yes)

也可以看看

  • HTTP 认证
  • WWW-Authenticate
  • Authorization
  • Proxy-Authorization
  • Proxy-Authenticate
  • 403, 407

扫码关注腾讯云开发者

领取腾讯云代金券