Skip to content

Commit

Permalink
Header design
Browse files Browse the repository at this point in the history
Referring to this PR nats-io/nats.go#1584
this includes an add() method to add a header key and value. This
would facilitate extra context since the service doesn't have
direct access to the request.
  • Loading branch information
hooksie1 committed Mar 17, 2024
1 parent 8911fc8 commit 7e77ffc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions adr/ADR-32.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
| 2 | 2023-09-12 | Configurable queue group |
| 3 | 2023-10-07 | Add version regex info |
| 4 | 2023-11-10 | Explicit naming |
| 5 | 2024-03-16 | Header methods |

## Context and Problem Statement

Expand Down Expand Up @@ -352,3 +353,15 @@ will dispatch requests as fast as the handler returns.
For consistency of documentation and understanding by users, clients that implement the
service API and tooling that interacts with services should use the term "service" or
"services".


### Headers

Services should allow headers to be retrieved through two methods:

- get(key) - returns the first value associated with the key
- values(key) - returns all values associated with the key

Services should allow a header value to be added through the following method:

- add(key, value) - adds the value to the associated key or adds the key/value if the key doesn't exist.

0 comments on commit 7e77ffc

Please sign in to comment.