MCPcopy
hub / github.com/mitmproxy/mitmproxy / json

Method json

mitmproxy/tools/web/app.py:315–323  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

313
314 @property
315 def json(self):
316 if not self.request.headers.get("Content-Type", "").startswith(
317 "application/json"
318 ):
319 raise APIError(400, "Invalid Content-Type, expected application/json.")
320 try:
321 return json.loads(self.request.body.decode())
322 except Exception as e:
323 raise APIError(400, f"Malformed JSON: {e}")
324
325 @property
326 def filecontents(self):

Callers 9

BtFunction · 0.45
index-Be7e-cwP.jsFile · 0.45
dFunction · 0.45
componentDidMountMethod · 0.45
YuFunction · 0.45
efFunction · 0.45
fetchDataMethod · 0.45
fetchDataMethod · 0.45
emoji.pyFile · 0.45

Calls 4

APIErrorClass · 0.85
loadsMethod · 0.80
getMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected