INNER CODE UNIT · Python
get_path
bobbui/json-logging-python · json_logging/framework/connexion/__init__.py:195
def get_path(self, request):
if _is_async_request(request):
return request.url.path
return request.path
def get_content_length(self, request):
if _is_async_request(request):
return request.headers.get('content-length', json_logging.EMPTY_VALUE)
return request.content_length
def get_method(self, request):
return request.method
def get_remote_ip(self, request):
if _is_async_request(request):
return request.client.host if request.client is not None else json_logging.EMPTY_VALUE
return request.remote_addr