Skip to content
Navigation Menu
Toggle navigation
Sign in
Product
Actions
Automate any workflow
Packages
Host and manage packages
Security
Find and fix vulnerabilities
Codespaces
Instant dev environments
GitHub Copilot
Write better code with AI
Code review
Manage code changes
Issues
Plan and track work
Discussions
Collaborate outside of code
Explore
All features
Documentation
GitHub Skills
Blog
Solutions
By size
Enterprise
Teams
Startups
By industry
Healthcare
Financial services
Manufacturing
By use case
CI/CD & Automation
DevOps
DevSecOps
Resources
Topics
AI
DevOps
Innersource
Open Source
Security
Software Development
Explore
Learning Pathways
White papers, Ebooks, Webinars
Customer Stories
Partners
Open Source
GitHub Sponsors
Fund open source developers
The ReadME Project
GitHub community articles
Repositories
Topics
Trending
Collections
Enterprise
Enterprise platform
AI-powered developer platform
Available add-ons
Advanced Security
Enterprise-grade security features
GitHub Copilot
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search or jump to...
Search code, repositories, users, issues, pull requests...
Search syntax tips
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Sign in
Sign up
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mdn
/
translated-content
Public
Notifications
You must be signed in to change notification settings
Fork
8k
Star
1.7k
Code
Issues
157
Pull requests
199
Actions
Projects
7
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security
Insights
Files
main
Breadcrumbs
translated-content
/
files
/
zh-cn
/
web
/
http
/
status
/
402
/
index.md
Blame
Blame
Latest commit
History
History
35 lines (22 loc) · 922 Bytes
main
Breadcrumbs
translated-content
/
files
/
zh-cn
/
web
/
http
/
status
/
402
/
index.md
Top
File metadata and controls
Preview
Code
Blame
35 lines (22 loc) · 922 Bytes
Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
title
:
402 Payment Required
slug
:
Web/HTTP/Status/402
---
{{HTTPSidebar}}{{SeeCompatTable}}
**
`
402 Payment Required
`
**
是一个被保留使用的非标准客户端错误状态响应码。
有时,这个状态码表明直到客户端付费之后请求才会被处理。402 状态码被创建最初目的是用于数字现金或微型支付系统,表明客户端请求的内���只有付费之后才能获取。目前还不存在标准的使用约定,不同的实体可以在不同的环境下使用。
##
状态
```
http
402 Payment Required
```
##
响应样例
```
http
HTTP/1.1 402 Payment Required
Date: Wed, 21 Oct 2015 07:28:00 GMT
```
##
规范
{{Specifications}}
##
浏览器兼容性
这个状态代码是
*
保留
*
的,但没有定义。实际上没有浏览器支持它,错误将被显示为一个通用的
`
4xx
`
状态代码。
##
参见
-
[
HTTP 认证
]
(
/zh-CN/docs/Web/HTTP/Authentication
)
You can’t perform that action at this time.