@@ -173,14 +173,26 @@ def __init__(
173173 self .location = location .replace (APPSEC .SECURITY_RESPONSE_ID , security_response_id )
174174 self .content_type : str = "application/json"
175175
176- def get (self , method_name : str , default : Any = None ) -> Any :
176+ def get (self , key : str , default : Any = None ) -> Union [ str , int ] :
177177 """
178178 Dictionary-like get method for backward compatibility with Lambda integration.
179179
180180 Returns the attribute value if it exists, otherwise returns the default value.
181181 This allows Block_config to be used in contexts that expect dictionary-like access.
182182 """
183- return getattr (self , method_name , default )
183+ if key == "content-type" :
184+ key = "content_type"
185+ return getattr (self , key , default )
186+
187+ def __getitem__ (self , key : str ) -> Optional [Union [str , int ]]:
188+ if key == "content-type" :
189+ key = "content_type"
190+ return getattr (self , key , None )
191+
192+ def __contains__ (self , key : str ) -> bool :
193+ if key == "content-type" :
194+ key = "content_type"
195+ return bool (getattr (self , key , None ))
184196
185197
186198class Telemetry_result :
0 commit comments