MCPcopy Create free account
hub / github.com/Flagsmith/flagsmith / __call__

Method __call__

api/app_analytics/middleware.py:34–45  ·  view source on GitHub ↗
(self, request: HttpRequest)

Source from the content-addressed store, hash-verified

32 self.get_response = get_response
33
34 def __call__(self, request: HttpRequest) -> HttpResponse:
35 if environment_key := request.headers.get("X-Environment-Key"):
36 track_usage_by_resource_host_and_environment(
37 resource=get_resource_from_uri(request.path),
38 host=request.get_host(),
39 environment_key=environment_key,
40 labels=map_request_to_labels(request),
41 )
42
43 response = self.get_response(request)
44
45 return response

Callers

nothing calls this directly

Calls 4

map_request_to_labelsFunction · 0.90
get_resource_from_uriFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected