Skip to content

Commit 3384801

Browse files
Copilotdarrelmiller
andcommitted
Update examples to use two-word policy names with spaces
Co-authored-by: darrelmiller <[email protected]>
1 parent 7f3121c commit 3384801

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

draft-ietf-httpapi-ratelimit-headers.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,13 @@ Policy identifiers can be expressed as Tokens (unquoted) or Strings (quoted). Bo
216216
The following example shows a policy with a partition key:
217217

218218
~~~
219-
RateLimit-Policy: peruser;q=100;w=60;pk=:cHsdsRa894==:
219+
RateLimit-Policy: "per user";q=100;w=60;pk=:cHsdsRa894==:
220220
~~~
221221

222222
The following example shows a policy with a partition key and a quota unit:
223223

224224
~~~
225-
RateLimit-Policy: peruser;q=65535;qu="content-bytes";w=10;pk=:sdfjLJUOUH==:
225+
RateLimit-Policy: "per user";q=65535;qu="content-bytes";w=10;pk=:sdfjLJUOUH==:
226226
~~~
227227

228228
# RateLimit Field {#ratelimit-field}
@@ -765,7 +765,7 @@ Response:
765765
~~~ http-message
766766
HTTP/1.1 200 Ok
767767
Content-Type: application/json
768-
RateLimit: dayLimit;r=100;t=36000
768+
RateLimit: "day limit";r=100;t=36000
769769

770770
{"hello": "world"}
771771
~~~
@@ -795,8 +795,8 @@ Response:
795795
~~~ http-message
796796
HTTP/1.1 200 Ok
797797
Content-Type: application/json
798-
RateLimit-Policy: basic;q=100;w=60
799-
RateLimit: basic;r=60;t=58
798+
RateLimit-Policy: "basic rate";q=100;w=60
799+
RateLimit: "basic rate";r=60;t=58
800800

801801
{"elapsed": 2, "issued": 40}
802802
~~~
@@ -817,8 +817,8 @@ Response:
817817
~~~ http-message
818818
HTTP/1.1 200 Ok
819819
Content-Type: application/json
820-
RateLimit-Policy: basic;q=100;w=60
821-
RateLimit: basic;r=20;t=56
820+
RateLimit-Policy: "basic rate";q=100;w=60
821+
RateLimit: "basic rate";r=20;t=56
822822

823823
{"elapsed": 4, "issued": 41}
824824
~~~
@@ -1072,8 +1072,8 @@ Response:
10721072
~~~ http-message
10731073
HTTP/1.1 200 OK
10741074
Content-Type: application/json
1075-
RateLimit-Policy: hour;q=1000;w=3600, "day";q=5000;w=86400
1076-
RateLimit: "day";r=100;t=36000
1075+
RateLimit-Policy: "per hour";q=1000;w=3600, "per day";q=5000;w=86400
1076+
RateLimit: "per day";r=100;t=36000
10771077

10781078
{"hello": "world"}
10791079
~~~

0 commit comments

Comments
 (0)