Class UrlProber


  • class UrlProber
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static Logger LOG  
    • Constructor Summary

      Constructors 
      Constructor Description
      UrlProber()  
    • Field Detail

      • LOG

        private static final Logger LOG
    • Constructor Detail

      • UrlProber

        UrlProber()
    • Method Detail

      • getUrlResponseCodeWithRedirectionResult

        static UrlRequestResult getUrlResponseCodeWithRedirectionResult​(java.net.URL url,
                                                                        java.util.Map<java.lang.String,​java.lang.String> requestProperties,
                                                                        HttpMethod requestMethod)
                                                                 throws java.io.IOException
        Connects to the given URL, and grabs a response code and redirection if the URL uses the HTTP protocol, or returns an arbitrary valid HTTP response code.
        Returns:
        the response code if HTTP connection and redirection value, or HttpURLConnection.HTTP_OK and null if not.
        Throws:
        java.io.IOException - if an I/O exception occurs.