Package com.microsoft.playwright
Class Route.FetchOptions
- java.lang.Object
-
- com.microsoft.playwright.Route.FetchOptions
-
-
Field Summary
Fields Modifier and Type Field Description Map<String,String>headersIf set changes the request HTTP headers.IntegermaxRedirectsMaximum number of request redirects that will be followed automatically.StringmethodIf set changes the request method (e.g.ObjectpostDataIf set changes the post data of request.DoubletimeoutRequest timeout in milliseconds.StringurlIf set changes the request URL.
-
Constructor Summary
Constructors Constructor Description FetchOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Route.FetchOptionssetHeaders(Map<String,String> headers)If set changes the request HTTP headers.Route.FetchOptionssetMaxRedirects(int maxRedirects)Maximum number of request redirects that will be followed automatically.Route.FetchOptionssetMethod(String method)If set changes the request method (e.g.Route.FetchOptionssetPostData(byte[] postData)If set changes the post data of request.Route.FetchOptionssetPostData(String postData)If set changes the post data of request.Route.FetchOptionssetTimeout(double timeout)Request timeout in milliseconds.Route.FetchOptionssetUrl(String url)If set changes the request URL.
-
-
-
Field Detail
-
headers
public Map<String,String> headers
If set changes the request HTTP headers. Header values will be converted to a string.
-
maxRedirects
public Integer 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
public String method
If set changes the request method (e.g. GET or POST).
-
postData
public Object postData
If set changes the post data of request.
-
timeout
public Double timeout
Request timeout in milliseconds. Defaults to30000(30 seconds). Pass0to disable timeout.
-
url
public String url
If set changes the request URL. New URL must have same protocol as original one.
-
-
Method Detail
-
setHeaders
public Route.FetchOptions setHeaders(Map<String,String> headers)
If set changes the request HTTP headers. Header values will be converted to a string.
-
setMaxRedirects
public Route.FetchOptions setMaxRedirects(int 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.
-
setMethod
public Route.FetchOptions setMethod(String method)
If set changes the request method (e.g. GET or POST).
-
setPostData
public Route.FetchOptions setPostData(String postData)
If set changes the post data of request.
-
setPostData
public Route.FetchOptions setPostData(byte[] postData)
If set changes the post data of request.
-
setTimeout
public Route.FetchOptions setTimeout(double timeout)
Request timeout in milliseconds. Defaults to30000(30 seconds). Pass0to disable timeout.
-
setUrl
public Route.FetchOptions setUrl(String url)
If set changes the request URL. New URL must have same protocol as original one.
-
-