Skip to content

Commit

Permalink
grammar / formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
caindy committed Mar 2, 2024
1 parent 484b93f commit 37d6af3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
3 changes: 2 additions & 1 deletion cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"dictionaryDefinitions": [],
"dictionaries": [],
"words": [
"CGMES"
"brotli"
,"CGMES"
,"devcontainer"
,"ENTSO"
,"excalidraw"
Expand Down
4 changes: 1 addition & 3 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ GEM
connection_pool (2.4.1)
dnsruby (1.70.0)
simpleidn (~> 0.2.1)
drb (2.2.0)
ruby2_keywords
drb (2.2.1)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
Expand Down Expand Up @@ -243,7 +242,6 @@ GEM
ffi (~> 1.0)
rexml (3.2.6)
rouge (3.26.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
safe_yaml (1.0.5)
sass (3.7.4)
Expand Down
15 changes: 8 additions & 7 deletions docs/articles/conditional-GET.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ TROLIE implementations MUST support the Conditional GET pattern and client
should use it to determine when limits snapshots are available. While this
pattern is [well-documented by
Mozilla](https://developer.mozilla.org/en-US/docs/Web/HTTP/Conditional_requests),
it can be helpful see a concrete example. In this article we will use discuss
it can be helpful see a concrete example. In this article we will discuss
this pattern in the context of obtaining a Forecast Limits Snapshot.

By employing the Conditional GET pattern, the client can efficiently determine
Expand Down Expand Up @@ -49,14 +49,15 @@ X-Rate-Limit-Reset: 3600
```

When using the Conditional GET pattern, the client includes the previously
received ETag and/or Last-Modified timestamp in the request headers. If the
resource has not been modified since the provided ETag or Last-Modified
timestamp, the server responds with a 304 Not Modified status code, indicating
received `ETag` and/or `Last-Modified` timestamp in the request headers. If the
resource has not been modified since the provided `ETag` or `Last-Modified`
timestamp, the server responds with a `304 Not Modified` status code, indicating
that the client's cached version is still valid. If the resource has been
modified, the server responds with a 200 OK status code and provides the updated
resource.

The TROLIE client can then issue a Conditional GET
The TROLIE client can then issue a Conditional GET:

```http
GET /limits/forecast-snapshot HTTP/1.1
Host: trolie.example.com
Expand All @@ -66,7 +67,8 @@ Accept-Encoding: br
If-None-Match: "d41d8cd98f00b204e9800998ecf8427e"
```

Assuming a new snapshot hasn't been generated, we should see a response similar to the following:
Assuming a new snapshot hasn't been generated, we should see a response similar
to the following:

```http
HTTP/1.1 304 Not Modified
Expand All @@ -77,7 +79,6 @@ X-Rate-Limit-Limit: 100
X-Rate-Limit-Remaining: 97
X-Rate-Limit-Reset: 3400
```

*Otherwise*, we would have gotten a new limit forecast:

```http
Expand Down

0 comments on commit 37d6af3

Please sign in to comment.