MCPcopy Create free account
hub / github.com/apify/crawlee-python / get_headers_dict

Function get_headers_dict

tests/unit/server.py:40–45  ·  view source on GitHub ↗

Extract request headers and return them as a dictionary.

(scope: dict[str, Any])

Source from the content-addressed store, hash-verified

38
39
40def get_headers_dict(scope: dict[str, Any]) -> dict[str, str]:
41 """Extract request headers and return them as a dictionary."""
42 headers = {}
43 for name, value in scope.get('headers', []):
44 headers[name.decode()] = value.decode()
45 return headers
46
47
48def get_query_params(query_string: bytes) -> dict[str, str]:

Callers 7

get_cookiesFunction · 0.85
post_echoFunction · 0.85
echo_headersFunction · 0.85
echo_user_agentFunction · 0.85
get_echoFunction · 0.85
base_index_endpointFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected