def log_request(request): urls_monitor = ['/v5/your_api_path', ] if request.method == 'POST' and any(x in request.url for x in urls_monitor): res = request.response() print(request.url) print(request.method) print(request.post_data_json) print(res.json())