Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions flask_profiler/flask_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import functools
import re
import time

import json
from pprint import pprint as pp

import logging
Expand Down Expand Up @@ -123,11 +123,14 @@ def wrapper(*args, **kwargs):
def wrapHttpEndpoint(f):
@functools.wraps(f)
def wrapper(*args, **kwargs):
body = request.data.decode("utf-8", "strict")
if body:
body = json.loads(body)
context = {
"url": request.base_url,
"args": dict(request.args.items()),
"form": dict(request.form.items()),
"body": request.data.decode("utf-8", "strict"),
"body": body,
"headers": dict(request.headers.items()),
"func": request.endpoint,
"ip": request.remote_addr
Expand Down
5 changes: 3 additions & 2 deletions flask_profiler/static/dist/css/main.css

Large diffs are not rendered by default.