Package com.microsoft.playwright
Class Route.FetchOptions
java.lang.Object
com.microsoft.playwright.Route.FetchOptions
- Enclosing interface:
Route
-
Field Summary
FieldsModifier and TypeFieldDescriptionIf set changes the request HTTP headers.Maximum number of request redirects that will be followed automatically.If set changes the request method (e.g.If set changes the post data of request.Request timeout in milliseconds.If set changes the request URL. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetHeaders(Map<String, String> headers) If set changes the request HTTP headers.setMaxRedirects(int maxRedirects) Maximum number of request redirects that will be followed automatically.If set changes the request method (e.g.setPostData(byte[] postData) If set changes the post data of request.setPostData(String postData) If set changes the post data of request.setTimeout(double timeout) Request timeout in milliseconds.If set changes the request URL.
-
Field Details
-
headers
If set changes the request HTTP headers. Header values will be converted to a string. -
maxRedirects
Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is exceeded. Defaults to20. Pass0to not follow redirects. -
method
If set changes the request method (e.g. GET or POST). -
postData
If set changes the post data of request. -
timeout
Request timeout in milliseconds. Defaults to30000(30 seconds). Pass0to disable timeout. -
url
If set changes the request URL. New URL must have same protocol as original one.
-
-
Constructor Details
-
FetchOptions
public FetchOptions()
-
-
Method Details
-
setHeaders
If set changes the request HTTP headers. Header values will be converted to a string. -
setMaxRedirects
Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is exceeded. Defaults to20. Pass0to not follow redirects. -
setMethod
If set changes the request method (e.g. GET or POST). -
setPostData
If set changes the post data of request. -
setPostData
If set changes the post data of request. -
setTimeout
Request timeout in milliseconds. Defaults to30000(30 seconds). Pass0to disable timeout. -
setUrl
If set changes the request URL. New URL must have same protocol as original one.
-