MCPcopy Create free account
hub / github.com/aws/aws-cli / has_header

Function has_header

awscli/botocore/utils.py:209–216  ·  view source on GitHub ↗

Case-insensitive check for header key.

(header_name, headers)

Source from the content-addressed store, hash-verified

207
208
209def has_header(header_name, headers):
210 """Case-insensitive check for header key."""
211 if header_name is None:
212 return False
213 elif isinstance(headers, botocore.awsrequest.HeadersDict):
214 return header_name in headers
215 else:
216 return header_name.lower() in [key.lower() for key in headers.keys()]
217
218
219def get_service_module_name(service_model):

Callers 3

test_has_headerFunction · 0.90
_serialize_headersMethod · 0.90

Calls

no outgoing calls

Tested by 1

test_has_headerFunction · 0.72