Package org.apache.calcite.runtime
Class HttpUtils
java.lang.Object
org.apache.calcite.runtime.HttpUtils
Utilities for connecting to REST services such as Splunk via HTTP.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
appendURLEncodedArgs
(StringBuilder out, CharSequence... args) static void
appendURLEncodedArgs
(StringBuilder out, Map<String, String> args) static InputStream
executeMethod
(String method, String url, @Nullable CharSequence data, @Nullable Map<String, String> headers, int cTimeout, int rTimeout) static HttpURLConnection
getURLConnection
(String url) static InputStream
post
(String url, @Nullable CharSequence data, Map<String, String> headers, int cTimeout, int rTimeout) static InputStream
-
Method Details
-
getURLConnection
- Throws:
IOException
-
appendURLEncodedArgs
-
appendURLEncodedArgs
-
post
public static InputStream post(String url, CharSequence data, Map<String, String> headers) throws IOException- Throws:
IOException
-
post
public static InputStream post(String url, @Nullable CharSequence data, Map<String, String> headers, int cTimeout, int rTimeout) throws IOException- Throws:
IOException
-
executeMethod
public static InputStream executeMethod(String method, String url, @Nullable CharSequence data, @Nullable Map<String, String> headers, int cTimeout, int rTimeout) throws IOException- Throws:
IOException
-