English 中文(简体)
达到许可证限额的吉大港山区地位法
原标题:What is the HTTP status code for License limit reached

我想知道,当用户的许可达到时,APIC应当返回哪一种理想的吉大港山区地位法?

最初,我想到的是第402号(所需时间),但这不是我的设想。 我的情况是,如果我的使用者试图增加第11个假胜地,他们就会出现其极限达到的错误。

请帮助我制定适当的《吉大港山区地位法》。

预 收

最佳回答

没有关于>的《吉大港山区地位法》高于,然而,如果你在应对有效载荷上作一个很好的说明,则有几个适合这种情况的吉大港山区地位法。

If the quota of requests has been exceeded, but more requests could be performed upon a payment, you could consider the 402 status code (even though the documentation says it s reserved for future use, its reason phrase is pretty clear and defines well its purpose):

6.5.2. 402 Pay requiredd

<代码>402 (Payment requiredd) status代码留待日后使用。

您可使用<代码>403,以表明在超过申请配额时禁止申请。 3. 要求的有效载荷中有一个很好的说明,始终受到欢迎:

6.5.3. 403 Forbidden

The 403 (Forbidden) status code indicates that the server understood the request but refuses to authorize it. A server that wishes to make public why the request has been forbidden can describe that reason in the response payload (if any). [..]

If you are applying restrictions on the number of requests per hour/day, the 429 status code may be suitable for your needs (however this status code is used by a server to indicate that too many requests have been received in a short amount of time, that is, the client is throttling):

429 太多请求

The 429 status code indicates that the user has sent too many requests in a given amount of time ("rate limiting").

The response representations SHOULD include details explaining the condition, and MAY include a Retry-After header indicating how long to wait before making a new request.

例如:

HTTP/1.1 429 Too Many Requests
Content-Type: text/html
Retry-After: 3600

<html>
   <head>
      <title>Too Many Requests</title>
   </head>
   <body>
      <h1>Too Many Requests</h1>
      <p>I only allow 50 requests per hour to this Web site per
         logged in user.  Try again soon.</p>
   </body>
</html>

Note that this specification does not define how the origin server identifies the user, nor how it counts requests. For example, an origin server that is limiting request rates can do so based upon counts of requests on a per-resource basis, across the entire server, or even among a set of servers. Likewise, it might identify the user by its authentication credentials, or a stateful cookie.

对<代码>429的答复 身份代码MUST NOT由藏匿处储存。

https://www.rfc-editor.org/rfc/rfc7231#section-6“rel=” 《吉大港山区地位法典》是《》。 如果上述地位法典不符合你的需要,你可以创造自己的地位。 由于新地位法出现客户错误,应在4xx/code>上公布。 范围。

问题回答

422 不可处理的实体应当在此案中开展工作。 请求本身是精心形成的。 问题在于目前的情况,因为用户达到了极限。 错误反应应有助于解决这一现状:

我的第二个信标是409 Conflict,但与版本和核对变化有关。 https://https.com/409





相关问题
How to set response filename without forcing "save as" dialog

I am returning a stream in some response setting the appropriate content-type header. The behavior I m looking for is this: If the browser is able to render content of the given content type then it ...

Which Http redirects status code to use?

friendfeed.com uses 302. bit.ly uses 301. I had decided to use 303. Do they behave differently in terms of support by browsers ?

Does HttpWebRequest send 200 OK automatically?

Background: I am implementing Paypal IPN handler. This great article on Paypal states that I am required to send a 200 OK back to Paypal after I read the response. The processing of IPN request is ...

Java HTTPAUTH

我试图把桌面应用程序连接起来,我是同D.icio.us api @ Delicious Alan书写的,简单地向他们提供我的用户名和密码,并请他把书记上写给我......。

Finding out where curl was redirected

I m using curl to make php send an http request to some website somewhere and have set CURLOPT_FOLLOWLOCATION to 1 so that it follows redirects. How then, can I find out where it was eventually ...