MCPcopy
hub / github.com/iojw/socialscan / get_json

Method get_json

socialscan/platforms.py:126–136  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

124
125 @staticmethod
126 async def get_json(request):
127 if not request.headers["Content-Type"].startswith("application/json"):
128 raise QueryError(
129 PlatformChecker.UNEXPECTED_CONTENT_TYPE_ERROR_MESSAGE.format(
130 request.headers["Content-Type"]
131 )
132 )
133 else:
134 json = await request.json()
135 logging.debug(f"JSON {request.url} {request.status}: {json}")
136 return json
137
138 @staticmethod
139 async def get_text(request):

Callers 12

check_usernameMethod · 0.80
check_usernameMethod · 0.80
check_emailMethod · 0.80
_checkMethod · 0.80
check_usernameMethod · 0.80
check_usernameMethod · 0.80
check_usernameMethod · 0.80
check_emailMethod · 0.80
check_emailMethod · 0.80
_checkMethod · 0.80
check_usernameMethod · 0.80
check_emailMethod · 0.80

Calls 1

QueryErrorClass · 0.85

Tested by

no test coverage detected