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

Method fetch

playwright/_impl/_network.py:470–491  ·  view source on GitHub ↗
(
        self,
        url: str = None,
        method: str = None,
        headers: Dict[str, str] = None,
        postData: Union[Any, str, bytes] = None,
        maxRedirects: int = None,
        maxRetries: int = None,
        timeout: float = None,
    )

Source from the content-addressed store, hash-verified

468 raise e
469
470 async def fetch(
471 self,
472 url: str = None,
473 method: str = None,
474 headers: Dict[str, str] = None,
475 postData: Union[Any, str, bytes] = None,
476 maxRedirects: int = None,
477 maxRetries: int = None,
478 timeout: float = None,
479 ) -> "APIResponse":
480 return await self._connection.wrap_api_call(
481 lambda: self._context.request._inner_fetch(
482 self.request,
483 url,
484 method,
485 headers,
486 postData,
487 maxRedirects=maxRedirects,
488 maxRetries=maxRetries,
489 timeout=timeout,
490 )
491 )
492
493 async def fallback(
494 self,

Calls 2

wrap_api_callMethod · 0.80
_inner_fetchMethod · 0.80