TestMatchRequestDetails constructor
TestMatchRequestDetails({
- required String url,
- String? initiator,
- RequestMethod? method,
- required ResourceType type,
- int? tabId,
- String? topUrl,
- Map? responseHeaders,
Implementation
TestMatchRequestDetails({
/// The URL of the hypothetical request.
required String url,
/// The initiator URL (if any) for the hypothetical request.
String? initiator,
/// Standard HTTP method of the hypothetical request. Defaults to "get" for
/// HTTP requests and is ignored for non-HTTP requests.
RequestMethod? method,
/// The resource type of the hypothetical request.
required ResourceType type,
/// The ID of the tab in which the hypothetical request takes place. Does
/// not need to correspond to a real tab ID. Default is -1, meaning that
/// the request isn't related to a tab.
int? tabId,
/// The associated top-level frame URL (if any) for the request.
String? topUrl,
/// The headers provided by a hypothetical response if the request does not
/// get blocked or redirected before it is sent. Represented as an object
/// which maps a header name to a list of string values. If not specified,
/// the hypothetical response would return empty response headers, which can
/// match rules which match on the non-existence of headers.
/// E.g. `{"content-type": ["text/html; charset=utf-8",
/// "multipart/form-data"]}`
Map? responseHeaders,
}) : _wrapped = $js.TestMatchRequestDetails(
url: url,
initiator: initiator,
method: method?.toJS,
type: type.toJS,
tabId: tabId,
topUrl: topUrl,
responseHeaders: responseHeaders?.jsify(),
);