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 voidappendURLEncodedArgs(StringBuilder out, CharSequence... args) static voidappendURLEncodedArgs(StringBuilder out, Map<String, String> args) static InputStreamexecuteMethod(String method, String url, @Nullable CharSequence data, @Nullable Map<String, String> headers, int cTimeout, int rTimeout) static HttpURLConnectiongetURLConnection(String url) static InputStreampost(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
-