test_class.file: bundles/org.openhab.core.io.net/src/test/java/org/openhab/core/io/net/http/HttpUtilTest.java
test_class.identifier: HttpUtilTest
test_class.superclass: extends BaseHttpUtilTest
test_case.body: @Test
      public void testCreateHttpMethodForUnsupportedTrace() {
          IllegalArgumentException exception = assertThrows(IllegalArgumentException.class,
                  () -> HttpUtil.createHttpMethod("TRACE"));
          assertEquals("Given HTTP Method 'TRACE' is unknown", exception.getMessage());
      }
test_case.class_method_signature: HttpUtilTest.testCreateHttpMethodForUnsupportedTrace()
test_case.full_signature: @Test public void testCreateHttpMethodForUnsupportedTrace()
test_case.identifier: testCreateHttpMethodForUnsupportedTrace
test_case.invocations: assertThrows createHttpMethod assertEquals getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCreateHttpMethodForUnsupportedTrace()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(HttpUtil.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(HttpUtil.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: DEFAULT_TIMEOUT_MS = 5000
focal_class.modifier: private static final
focal_class.original_string: private static final int DEFAULT_TIMEOUT_MS = 5000;
focal_class.type: int
focal_class.var_name: DEFAULT_TIMEOUT_MS
focal_class.declarator: httpClientFactory
focal_class.modifier: private static
focal_class.original_string: private static HttpClientFactory httpClientFactory;
focal_class.type: HttpClientFactory
focal_class.var_name: httpClientFactory
focal_class.file: bundles/org.openhab.core.io.net/src/main/java/org/openhab/core/io/net/http/HttpUtil.java
focal_class.identifier: HttpUtil
focal_class.class_method_signature: HttpUtil.executeUrl(String httpMethod, String url, int timeout)
focal_class.full_signature: public static String executeUrl(String httpMethod, String url, int timeout)
focal_class.identifier: executeUrl
focal_class.modifiers: public static
focal_class.parameters: (String httpMethod, String url, int timeout)
focal_class.return: String
focal_class.signature: String executeUrl(String httpMethod, String url, int timeout)
focal_class.class_method_signature: HttpUtil.executeUrl(String httpMethod, String url, InputStream content, String contentType, int timeout)
focal_class.full_signature: public static String executeUrl(String httpMethod, String url, InputStream content, String contentType, int timeout)
focal_class.identifier: executeUrl
focal_class.modifiers: public static
focal_class.parameters: (String httpMethod, String url, InputStream content, String contentType, int timeout)
focal_class.return: String
focal_class.signature: String executeUrl(String httpMethod, String url, InputStream content, String contentType, int timeout)
focal_class.class_method_signature: HttpUtil.executeUrl(String httpMethod, String url, Properties httpHeaders, InputStream content,
              String contentType, int timeout)
focal_class.full_signature: public static String executeUrl(String httpMethod, String url, Properties httpHeaders, InputStream content,
              String contentType, int timeout)
focal_class.identifier: executeUrl
focal_class.modifiers: public static
focal_class.parameters: (String httpMethod, String url, Properties httpHeaders, InputStream content,
              String contentType, int timeout)
focal_class.return: String
focal_class.signature: String executeUrl(String httpMethod, String url, Properties httpHeaders, InputStream content,
              String contentType, int timeout)
focal_class.class_method_signature: HttpUtil.executeUrl(String httpMethod, String url, Properties httpHeaders, InputStream content,
              String contentType, int timeout, String proxyHost, Integer proxyPort, String proxyUser,
              String proxyPassword, String nonProxyHosts)
focal_class.full_signature: public static String executeUrl(String httpMethod, String url, Properties httpHeaders, InputStream content,
              String contentType, int timeout, String proxyHost, Integer proxyPort, String proxyUser,
              String proxyPassword, String nonProxyHosts)
focal_class.identifier: executeUrl
focal_class.modifiers: public static
focal_class.parameters: (String httpMethod, String url, Properties httpHeaders, InputStream content,
              String contentType, int timeout, String proxyHost, Integer proxyPort, String proxyUser,
              String proxyPassword, String nonProxyHosts)
focal_class.return: String
focal_class.signature: String executeUrl(String httpMethod, String url, Properties httpHeaders, InputStream content,
              String contentType, int timeout, String proxyHost, Integer proxyPort, String proxyUser,
              String proxyPassword, String nonProxyHosts)
focal_class.class_method_signature: HttpUtil.executeUrlAndGetReponse(String httpMethod, String url, Properties httpHeaders,
              InputStream content, String contentType, int timeout, String proxyHost, Integer proxyPort, String proxyUser,
              String proxyPassword, String nonProxyHosts)
focal_class.full_signature: private static ContentResponse executeUrlAndGetReponse(String httpMethod, String url, Properties httpHeaders,
              InputStream content, String contentType, int timeout, String proxyHost, Integer proxyPort, String proxyUser,
              String proxyPassword, String nonProxyHosts)
focal_class.identifier: executeUrlAndGetReponse
focal_class.modifiers: private static
focal_class.parameters: (String httpMethod, String url, Properties httpHeaders,
              InputStream content, String contentType, int timeout, String proxyHost, Integer proxyPort, String proxyUser,
              String proxyPassword, String nonProxyHosts)
focal_class.return: ContentResponse
focal_class.signature: ContentResponse executeUrlAndGetReponse(String httpMethod, String url, Properties httpHeaders,
              InputStream content, String contentType, int timeout, String proxyHost, Integer proxyPort, String proxyUser,
              String proxyPassword, String nonProxyHosts)
focal_class.class_method_signature: HttpUtil.prepareProxyParams()
focal_class.full_signature: private static ProxyParams prepareProxyParams()
focal_class.identifier: prepareProxyParams
focal_class.modifiers: private static
focal_class.parameters: ()
focal_class.return: ProxyParams
focal_class.signature: ProxyParams prepareProxyParams()
focal_class.class_method_signature: HttpUtil.shouldUseProxy(String urlString, String nonProxyHosts)
focal_class.full_signature: private static boolean shouldUseProxy(String urlString, String nonProxyHosts)
focal_class.identifier: shouldUseProxy
focal_class.modifiers: private static
focal_class.parameters: (String urlString, String nonProxyHosts)
focal_class.return: boolean
focal_class.signature: boolean shouldUseProxy(String urlString, String nonProxyHosts)
focal_class.class_method_signature: HttpUtil.createHttpMethod(String httpMethodString)
focal_class.full_signature: public static HttpMethod createHttpMethod(String httpMethodString)
focal_class.identifier: createHttpMethod
focal_class.modifiers: public static
focal_class.parameters: (String httpMethodString)
focal_class.return: HttpMethod
focal_class.signature: HttpMethod createHttpMethod(String httpMethodString)
focal_class.class_method_signature: HttpUtil.downloadImage(String url)
focal_class.full_signature: public static RawType downloadImage(String url)
focal_class.identifier: downloadImage
focal_class.modifiers: public static
focal_class.parameters: (String url)
focal_class.return: RawType
focal_class.signature: RawType downloadImage(String url)
focal_class.class_method_signature: HttpUtil.downloadImage(String url, int timeout)
focal_class.full_signature: public static RawType downloadImage(String url, int timeout)
focal_class.identifier: downloadImage
focal_class.modifiers: public static
focal_class.parameters: (String url, int timeout)
focal_class.return: RawType
focal_class.signature: RawType downloadImage(String url, int timeout)
focal_class.class_method_signature: HttpUtil.downloadImage(String url, boolean scanTypeInContent, long maxContentLength)
focal_class.full_signature: public static RawType downloadImage(String url, boolean scanTypeInContent, long maxContentLength)
focal_class.identifier: downloadImage
focal_class.modifiers: public static
focal_class.parameters: (String url, boolean scanTypeInContent, long maxContentLength)
focal_class.return: RawType
focal_class.signature: RawType downloadImage(String url, boolean scanTypeInContent, long maxContentLength)
focal_class.class_method_signature: HttpUtil.downloadImage(String url, boolean scanTypeInContent, long maxContentLength, int timeout)
focal_class.full_signature: public static RawType downloadImage(String url, boolean scanTypeInContent, long maxContentLength, int timeout)
focal_class.identifier: downloadImage
focal_class.modifiers: public static
focal_class.parameters: (String url, boolean scanTypeInContent, long maxContentLength, int timeout)
focal_class.return: RawType
focal_class.signature: RawType downloadImage(String url, boolean scanTypeInContent, long maxContentLength, int timeout)
focal_class.class_method_signature: HttpUtil.downloadData(String url, String contentTypeRegex, boolean scanTypeInContent,
              long maxContentLength)
focal_class.full_signature: public static RawType downloadData(String url, String contentTypeRegex, boolean scanTypeInContent,
              long maxContentLength)
focal_class.identifier: downloadData
focal_class.modifiers: public static
focal_class.parameters: (String url, String contentTypeRegex, boolean scanTypeInContent,
              long maxContentLength)
focal_class.return: RawType
focal_class.signature: RawType downloadData(String url, String contentTypeRegex, boolean scanTypeInContent,
              long maxContentLength)
focal_class.class_method_signature: HttpUtil.downloadData(String url, String contentTypeRegex, boolean scanTypeInContent,
              long maxContentLength, int timeout)
focal_class.full_signature: public static RawType downloadData(String url, String contentTypeRegex, boolean scanTypeInContent,
              long maxContentLength, int timeout)
focal_class.identifier: downloadData
focal_class.modifiers: public static
focal_class.parameters: (String url, String contentTypeRegex, boolean scanTypeInContent,
              long maxContentLength, int timeout)
focal_class.return: RawType
focal_class.signature: RawType downloadData(String url, String contentTypeRegex, boolean scanTypeInContent,
              long maxContentLength, int timeout)
focal_class.class_method_signature: HttpUtil.guessContentTypeFromData(byte[] data)
focal_class.full_signature: public static String guessContentTypeFromData(byte[] data)
focal_class.identifier: guessContentTypeFromData
focal_class.modifiers: public static
focal_class.parameters: (byte[] data)
focal_class.return: String
focal_class.signature: String guessContentTypeFromData(byte[] data)
focal_class.class_method_signature: HttpUtil.isJpeg(byte[] data)
focal_class.full_signature: private static boolean isJpeg(byte[] data)
focal_class.identifier: isJpeg
focal_class.modifiers: private static
focal_class.parameters: (byte[] data)
focal_class.return: boolean
focal_class.signature: boolean isJpeg(byte[] data)
focal_class.class_method_signature: HttpUtil.setHttpClientFactory(final HttpClientFactory httpClientFactory)
focal_class.full_signature: @Reference protected void setHttpClientFactory(final HttpClientFactory httpClientFactory)
focal_class.identifier: setHttpClientFactory
focal_class.modifiers: @Reference protected
focal_class.parameters: (final HttpClientFactory httpClientFactory)
focal_class.return: void
focal_class.signature: void setHttpClientFactory(final HttpClientFactory httpClientFactory)
focal_class.class_method_signature: HttpUtil.unsetHttpClientFactory(final HttpClientFactory httpClientFactory)
focal_class.full_signature: protected void unsetHttpClientFactory(final HttpClientFactory httpClientFactory)
focal_class.identifier: unsetHttpClientFactory
focal_class.modifiers: protected
focal_class.parameters: (final HttpClientFactory httpClientFactory)
focal_class.return: void
focal_class.signature: void unsetHttpClientFactory(final HttpClientFactory httpClientFactory)
focal_method.body: public static HttpMethod createHttpMethod(String httpMethodString) {
          // @formatter:off
          return Optional.ofNullable(HttpMethod.fromString(httpMethodString))
                  .filter(m -> m == GET || m == POST || m == PUT || m == DELETE)
                  .orElseThrow(() -> new IllegalArgumentException("Given HTTP Method '" + httpMethodString + "' is unknown"));
          // @formatter:on
      }
focal_method.class_method_signature: HttpUtil.createHttpMethod(String httpMethodString)
focal_method.full_signature: public static HttpMethod createHttpMethod(String httpMethodString)
focal_method.identifier: createHttpMethod
focal_method.invocations: orElseThrow filter ofNullable fromString
focal_method.modifiers: public static
focal_method.parameters: (String httpMethodString)
focal_method.return: HttpMethod
focal_method.signature: HttpMethod createHttpMethod(String httpMethodString)