Skip to content

Commit bf2df4f

Browse files
pgrzesikleandrodamascenaheitorlessa
authored
docs(event_handler): add information about case-insensitive header lookup function (#3183)
Co-authored-by: Leandro Damascena <[email protected]> Co-authored-by: Heitor Lessa <[email protected]>
1 parent c190c62 commit bf2df4f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

aws_lambda_powertools/utilities/data_classes/common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def get_header_value(
189189
default_value: str, optional
190190
Default value if no value was found by name
191191
case_sensitive: bool
192-
Whether to use a case-sensitive look up
192+
Whether to use a case-sensitive look up. By default we make a case-insensitive lookup.
193193
Returns
194194
-------
195195
str, optional

docs/core/event_handler/api_gateway.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ You can access the raw payload via `body` property, or if it's a JSON string you
239239

240240
#### Headers
241241

242-
Similarly to [Query strings](#query-strings-and-payload), you can access headers as dictionary via `app.current_event.headers`, or by name via `get_header_value`.
242+
Similarly to [Query strings](#query-strings-and-payload), you can access headers as dictionary via `app.current_event.headers`, or by name via `get_header_value`. If you prefer a case-insensitive lookup of the header value, the `app.current_event.get_header_value` function automatically handles it.
243243

244244
```python hl_lines="19" title="Accessing HTTP Headers"
245245
--8<-- "examples/event_handler_rest/src/accessing_request_details_headers.py"

0 commit comments

Comments
 (0)