MCPcopy Index your code
hub / github.com/microsoft/playwright-python / post_data_json

Method post_data_json

playwright/_impl/_network.py:219–229  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

217
218 @property
219 def post_data_json(self) -> Optional[Any]:
220 post_data = self.post_data
221 if not post_data:
222 return None
223 content_type = self.headers.get("content-type")
224 if content_type and "application/x-www-form-urlencoded" in content_type:
225 return dict(parse.parse_qsl(post_data))
226 try:
227 return json.loads(post_data)
228 except Exception:
229 raise Error(f"POST data is not a valid JSON object: {post_data}")
230
231 @property
232 def post_data_buffer(self) -> Optional[bytes]:

Callers

nothing calls this directly

Calls 2

ErrorClass · 0.90
getMethod · 0.45

Tested by

no test coverage detected