MCPcopy Index your code
hub / github.com/pywebio/PyWebIO / read_event_data

Method read_event_data

pywebio/platform/adaptor/http.py:243–249  ·  view source on GitHub ↗
(self, context: HttpContext)

Source from the content-addressed store, hash-verified

241 return self.cdn
242
243 def read_event_data(self, context: HttpContext) -> List[Dict]:
244 try:
245 if context.request_headers().get('content-type') == 'application/octet-stream':
246 return [deserialize_binary_event(context.request_body())]
247 return json.loads(context.request_body())
248 except Exception:
249 return []
250
251 @contextmanager
252 def handle_request_context(self, context: HttpContext):

Callers 1

Calls 4

deserialize_binary_eventFunction · 0.85
getMethod · 0.45
request_headersMethod · 0.45
request_bodyMethod · 0.45

Tested by

no test coverage detected