Package io.karatelabs.driver
Class InterceptRequest
java.lang.Object
io.karatelabs.driver.InterceptRequest
Represents an intercepted HTTP request.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet a specific header value.Get the request headers.Get the HTTP method (GET, POST, etc.).Get the POST data (request body).Get the CDP request ID for this interception.Get the resource type (Document, Script, Stylesheet, Image, etc.).getUrl()Get the request URL.toString()booleanurlContains(String substring) Check if the URL contains the given substring.booleanurlMatches(String pattern) Check if the URL matches the given pattern (supports * wildcards).
-
Constructor Details
-
InterceptRequest
-
-
Method Details
-
getRequestId
Get the CDP request ID for this interception. -
getUrl
Get the request URL. -
getMethod
Get the HTTP method (GET, POST, etc.). -
getHeaders
Get the request headers. -
getHeader
Get a specific header value. -
getPostData
Get the POST data (request body). -
getResourceType
Get the resource type (Document, Script, Stylesheet, Image, etc.). -
urlContains
Check if the URL contains the given substring. -
urlMatches
Check if the URL matches the given pattern (supports * wildcards). -
toString
-