Class Route.FallbackOptions

java.lang.Object
com.microsoft.playwright.Route.FallbackOptions
Enclosing interface:
Route

public static class Route.FallbackOptions extends Object
  • Field Details

    • headers

      public Map<String,String> headers
      If set changes the request HTTP headers. Header values will be converted to a string.
    • 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.
    • url

      public String url
      If set changes the request URL. New URL must have same protocol as original one. Changing the URL won't affect the route matching, all the routes are matched using the original request URL.
  • Constructor Details

    • FallbackOptions

      public FallbackOptions()
  • Method Details

    • setHeaders

      public Route.FallbackOptions setHeaders(Map<String,String> headers)
      If set changes the request HTTP headers. Header values will be converted to a string.
    • setMethod

      public Route.FallbackOptions setMethod(String method)
      If set changes the request method (e.g. GET or POST).
    • setPostData

      public Route.FallbackOptions setPostData(String postData)
      If set changes the post data of request.
    • setPostData

      public Route.FallbackOptions setPostData(byte[] postData)
      If set changes the post data of request.
    • setUrl

      public Route.FallbackOptions setUrl(String url)
      If set changes the request URL. New URL must have same protocol as original one. Changing the URL won't affect the route matching, all the routes are matched using the original request URL.