mokr.network.manager.firefox
Attributes
Classes
Class to handle requests in a given |
Module Contents
- mokr.network.manager.firefox.LOGGER
- class mokr.network.manager.firefox.FirefoxNetworkManager(page: mokr.browser.page.Page, client: mokr.connection.DevtoolsConnection, frame_manager: mokr.frame.FrameManager, interception_callback_chain: list[Callable])
Bases:
mokr.network.manager.base.NetworkManagerClass to handle requests in a given
mokr.browser.Page.Note that functionality of this class is severely limited compared to it’s Chrome counterpart,
mokr.network.ChromeNetworkManager.Request interception does not block requests and can only be used to observe partial request and response data.
The
interception_callback_chainthis class receives from the parentmokr.browser.Pageis shared with spawnedmokr.network.Requestobjects. While the request interception callback chain is run from theRequestobject, it is initiated during select events from this class.- Parameters:
page (Page) – Parent
mokr.browser.Page.client (DevtoolsConnection) – A
mokr.connection.DevtoolsConnectionspawned by the parentmokr.browser.Page.frame_manager (FrameManager) – The
mokr.frame.FrameManagerfrom themokr.browser.Pagethat spawned this element.interception_callback_chain (list[Callable]) – A list of callbacks to be passed into new
mokr.network.Request`s that will be run during "request" event interception, by that object. Inherited from the parent `mokr.browser.Page.
- property extra_http_headers: dict[str, str]
For parity; Firefox doesn’t support sending extra headers via CDP.
- async set_request_interception(*args, **kwargs) None
Not supported by Firefox.
- Raises:
FirefoxNotImplementedError – When Firefox unsupported errors are on.
- async set_extra_http_headers(*args, **kwargs) None
Not supported by Firefox.
- Raises:
FirefoxNotImplementedError – When Firefox unsupported errors are on.