Class Network<AUTHREQUIRED,​REQUESTPAUSED>


  • public abstract class Network<AUTHREQUIRED,​REQUESTPAUSED>
    extends java.lang.Object
    • Field Detail

      • devTools

        protected final DevTools devTools
    • Constructor Detail

      • Network

        public Network​(DevTools devtools)
    • Method Detail

      • disable

        public void disable()
      • setUserAgent

        public void setUserAgent​(java.lang.String userAgent)
      • addAuthHandler

        public void addAuthHandler​(java.util.function.Predicate<java.net.URI> whenThisMatches,
                                   java.util.function.Supplier<Credentials> useTheseCredentials)
      • resetNetworkFilter

        public void resetNetworkFilter()
      • interceptTrafficWith

        public void interceptTrafficWith​(Filter filter)
      • prepareToInterceptTraffic

        public void prepareToInterceptTraffic()
      • getAuthCredentials

        protected java.util.Optional<Credentials> getAuthCredentials​(java.net.URI uri)
      • convertFromCdpHttpMethod

        protected HttpMethod convertFromCdpHttpMethod​(java.lang.String method)
      • createHttpResponse

        protected HttpResponse createHttpResponse​(java.util.Optional<java.lang.Integer> statusCode,
                                                  java.lang.String body,
                                                  java.lang.Boolean bodyIsBase64Encoded,
                                                  java.util.List<java.util.Map.Entry<java.lang.String,​java.lang.String>> headers)
      • createHttpRequest

        protected HttpRequest createHttpRequest​(java.lang.String cdpMethod,
                                                java.lang.String url,
                                                java.util.Map<java.lang.String,​java.lang.Object> headers,
                                                java.util.Optional<java.lang.String> postData)
      • setUserAgentOverride

        protected abstract Command<java.lang.Void> setUserAgentOverride​(Network.UserAgent userAgent)
      • enableNetworkCaching

        protected abstract Command<java.lang.Void> enableNetworkCaching()
      • disableNetworkCaching

        protected abstract Command<java.lang.Void> disableNetworkCaching()
      • enableFetchForAllPatterns

        protected abstract Command<java.lang.Void> enableFetchForAllPatterns()
      • disableFetch

        protected abstract Command<java.lang.Void> disableFetch()
      • getUriFrom

        protected abstract java.lang.String getUriFrom​(AUTHREQUIRED authRequired)
      • cancelAuth

        protected abstract Command<java.lang.Void> cancelAuth​(AUTHREQUIRED authrequired)
      • getRequestId

        protected abstract java.lang.String getRequestId​(REQUESTPAUSED pausedReq)
      • continueWithoutModification

        protected abstract Command<java.lang.Void> continueWithoutModification​(REQUESTPAUSED pausedReq)