blob: 8aaf8bb587aa4cae1faff59022c45741a0d8f116 (
plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
---
title: 402 Payment Required
slug: Web/HTTP/Status/402
tags:
- HTTP
- 支付成功才可使用
- 状态码
- 错误码
translation_of: Web/HTTP/Status/402
---
<p>{{SeeCompatTable}}</p>
<p><strong style="font-size: 1rem; letter-spacing: -0.00278rem;"><code>402 Payment Required</code></strong> 是一个被保留使用的非标准客户端错误状态响应码。</p>
<p>有时, 这个状态码表明直到客户端付费之后请求才会被处理。402状态码被创建最初目的是用于数字现金或微型支付系统, 表明客户端请求的内容只有付费之后才能获取。目前还不存在标准的使用约定, 不同的实体可以在不同的环境下使用。</p>
<h2 id="状态">状态</h2>
<pre>402 Payment Required</pre>
<h2 id="响应样例">响应样例</h2>
<pre>HTTP/1.1 402 Payment Required
Date: Wed, 21 Oct 2015 07:28:00 GMT
</pre>
<h2 id="规范">规范</h2>
<table>
<tbody>
<tr>
<th scope="col">规范</th>
<th scope="col">标题</th>
</tr>
<tr>
<td>{{RFC("7231", "402 Payment Required" , "6.5.2")}}</td>
<td>HTTP/1.1: Semantics and Content</td>
</tr>
</tbody>
</table>
<h2 id="浏览器兼容性">浏览器兼容性</h2>
<p>{{Compat("http.status.402")}}</p>
<h2 id="相关内容">相关内容</h2>
<ul>
<li><a href="/en-US/docs/Web/HTTP/Authentication">HTTP authentication</a></li>
</ul>
|