Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | List of all members
playwright.sync_api._generated.APIRequest Class Reference
Inheritance diagram for playwright.sync_api._generated.APIRequest:
Inheritance graph
[legend]
Collaboration diagram for playwright.sync_api._generated.APIRequest:
Collaboration graph
[legend]

Public Member Functions

"APIRequestContext" new_context (self, *typing.Optional[str] base_url=None, typing.Optional[typing.Dict[str, str]] extra_http_headers=None, typing.Optional[HttpCredentials] http_credentials=None, typing.Optional[bool] ignore_https_errors=None, typing.Optional[ProxySettings] proxy=None, typing.Optional[str] user_agent=None, typing.Optional[float] timeout=None, typing.Optional[typing.Union[StorageState, str, pathlib.Path]] storage_state=None, typing.Optional[typing.List[ClientCertificate]] client_certificates=None, typing.Optional[bool] fail_on_status_code=None, typing.Optional[int] max_redirects=None)
 
- Public Member Functions inherited from playwright._impl._sync_base.SyncBase
None __init__ (self, Any impl_obj)
 
str __str__ (self)
 
None on (self, Any event, Any f)
 
None once (self, Any event, Any f)
 
None remove_listener (self, Any event, Any f)
 
- Public Member Functions inherited from playwright._impl._impl_to_api_mapping.ImplWrapper
str __repr__ (self)
 

Additional Inherited Members

- Protected Member Functions inherited from playwright._impl._sync_base.SyncBase
Any _sync (self, Union[Coroutine[Any, Any, Any], Generator[Any, Any, Any]] coro)
 
Callable[..., None] _wrap_handler (self, Union[Callable[..., Any], Any] handler)
 
- Protected Attributes inherited from playwright._impl._sync_base.SyncBase
 _dispatcher_fiber
 
 _loop
 
- Protected Attributes inherited from playwright._impl._impl_to_api_mapping.ImplWrapper
 _impl_obj
 

Member Function Documentation

◆ new_context()

"APIRequestContext" playwright.sync_api._generated.APIRequest.new_context (   self,
*typing.Optional[str]   base_url = None,
typing.Optional[typing.Dict[str, str]]   extra_http_headers = None,
typing.Optional[HttpCredentials]   http_credentials = None,
typing.Optional[bool]   ignore_https_errors = None,
typing.Optional[ProxySettings]   proxy = None,
typing.Optional[str]   user_agent = None,
typing.Optional[float]   timeout = None,
typing.Optional[ typing.Union[StorageState, str, pathlib.Path] ]   storage_state = None,
typing.Optional[typing.List[ClientCertificate]]   client_certificates = None,
typing.Optional[bool]   fail_on_status_code = None,
typing.Optional[int]   max_redirects = None 
)
APIRequest.new_context

Creates new instances of `APIRequestContext`.

Parameters
----------
base_url : Union[str, None]
    Methods like `a_pi_request_context.get()` take the base URL into consideration by using the
    [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL.
    Examples:
    - baseURL: `http://localhost:3000` and sending request to `/bar.html` results in `http://localhost:3000/bar.html`
    - baseURL: `http://localhost:3000/foo/` and sending request to `./bar.html` results in
      `http://localhost:3000/foo/bar.html`
    - baseURL: `http://localhost:3000/foo` (without trailing slash) and navigating to `./bar.html` results in
      `http://localhost:3000/bar.html`
extra_http_headers : Union[Dict[str, str], None]
    An object containing additional HTTP headers to be sent with every request. Defaults to none.
http_credentials : Union[{username: str, password: str, origin: Union[str, None], send: Union["always", "unauthorized", None]}, None]
    Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no
    origin is specified, the username and password are sent to any servers upon unauthorized responses.
ignore_https_errors : Union[bool, None]
    Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
proxy : Union[{server: str, bypass: Union[str, None], username: Union[str, None], password: Union[str, None]}, None]
    Network proxy settings.
user_agent : Union[str, None]
    Specific user agent to use in this context.
timeout : Union[float, None]
    Maximum time in milliseconds to wait for the response. Defaults to `30000` (30 seconds). Pass `0` to disable
    timeout.
storage_state : Union[pathlib.Path, str, {cookies: Sequence[{name: str, value: str, domain: str, path: str, expires: float, httpOnly: bool, secure: bool, sameSite: Union["Lax", "None", "Strict"]}], origins: Sequence[{origin: str, localStorage: Sequence[{name: str, value: str}]}]}, None]
    Populates context with given storage state. This option can be used to initialize context with logged-in
    information obtained via `browser_context.storage_state()` or `a_pi_request_context.storage_state()`.
    Either a path to the file with saved storage, or the value returned by one of
    `browser_context.storage_state()` or `a_pi_request_context.storage_state()` methods.
client_certificates : Union[Sequence[{origin: str, certPath: Union[pathlib.Path, str, None], cert: Union[bytes, None], keyPath: Union[pathlib.Path, str, None], key: Union[bytes, None], pfxPath: Union[pathlib.Path, str, None], pfx: Union[bytes, None], passphrase: Union[str, None]}], None]
    TLS Client Authentication allows the server to request a client certificate and verify it.

    **Details**

    An array of client certificates to be used. Each certificate object must have either both `certPath` and `keyPath`,
    a single `pfxPath`, or their corresponding direct value equivalents (`cert` and `key`, or `pfx`). Optionally,
    `passphrase` property should be provided if the certificate is encrypted. The `origin` property should be provided
    with an exact match to the request origin that the certificate is valid for.

    Client certificate authentication is only active when at least one client certificate is provided. If you want to
    reject all client certificates sent by the server, you need to provide a client certificate with an `origin` that
    does not match any of the domains you plan to visit.

    **NOTE** When using WebKit on macOS, accessing `localhost` will not pick up client certificates. You can make it
    work by replacing `localhost` with `local.playwright`.

fail_on_status_code : Union[bool, None]
    Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
    codes.
max_redirects : Union[int, None]
    Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is
    exceeded. Defaults to `20`. Pass `0` to not follow redirects. This can be overwritten for each request
    individually.

Returns
-------
APIRequestContext

The documentation for this class was generated from the following file: