diff --git a/aws_lambda_powertools/utilities/data_classes/common.py b/aws_lambda_powertools/utilities/data_classes/common.py index fa7c5296042..28229c21a62 100644 --- a/aws_lambda_powertools/utilities/data_classes/common.py +++ b/aws_lambda_powertools/utilities/data_classes/common.py @@ -189,7 +189,7 @@ def get_header_value( default_value: str, optional Default value if no value was found by name case_sensitive: bool - Whether to use a case-sensitive look up + Whether to use a case-sensitive look up. By default we make a case-insensitive lookup. Returns ------- str, optional diff --git a/docs/core/event_handler/api_gateway.md b/docs/core/event_handler/api_gateway.md index 88d5096267a..5ae15a9df2e 100644 --- a/docs/core/event_handler/api_gateway.md +++ b/docs/core/event_handler/api_gateway.md @@ -239,7 +239,7 @@ You can access the raw payload via `body` property, or if it's a JSON string you #### Headers -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`. +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. ```python hl_lines="19" title="Accessing HTTP Headers" --8<-- "examples/event_handler_rest/src/accessing_request_details_headers.py"