blob: d60e8dd4697521ae983e5ec3a8f8d02454288a06 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SimpleHttp (Drill : 1.20.3 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="SimpleHttp (Drill : 1.20.3 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":10,"i3":9,"i4":9,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":9,"i11":9,"i12":9,"i13":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/SimpleHttp.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../../org/apache/drill/exec/store/http/util/HttpProxyConfig.ProxyType.html" title="enum in org.apache.drill.exec.store.http.util"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../../org/apache/drill/exec/store/http/util/SimpleHttp.BasicAuthInterceptor.html" title="class in org.apache.drill.exec.store.http.util"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/apache/drill/exec/store/http/util/SimpleHttp.html" target="_top">Frames</a></li>
<li><a href="SimpleHttp.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.drill.exec.store.http.util</div>
<h2 title="Class SimpleHttp" class="title">Class SimpleHttp</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.drill.exec.store.http.util.SimpleHttp</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">SimpleHttp</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></pre>
<div class="block">Performs the actual HTTP requests for the HTTP Storage Plugin. The core
method is the getInputStream() method which accepts a url and opens an
InputStream with that URL's contents.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/store/http/util/SimpleHttp.BasicAuthInterceptor.html" title="class in org.apache.drill.exec.store.http.util">SimpleHttp.BasicAuthInterceptor</a></span></code>
<div class="block">Intercepts requests and adds authentication headers to the request</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/store/http/util/SimpleHttp.SimpleHttpBuilder.html" title="class in org.apache.drill.exec.store.http.util">SimpleHttp.SimpleHttpBuilder</a></span></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/store/http/util/SimpleHttp.html#SimpleHttp-org.apache.drill.exec.store.http.HttpSubScan-okhttp3.HttpUrl-java.io.File-org.apache.drill.exec.store.http.util.HttpProxyConfig-org.apache.drill.common.exceptions.CustomErrorContext-org.apache.drill.exec.store.http.paginator.Paginator-">SimpleHttp</a></span>(<a href="../../../../../../../org/apache/drill/exec/store/http/HttpSubScan.html" title="class in org.apache.drill.exec.store.http">HttpSubScan</a>&nbsp;scanDefn,
okhttp3.HttpUrl&nbsp;url,
<a href="https://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;tempDir,
<a href="../../../../../../../org/apache/drill/exec/store/http/util/HttpProxyConfig.html" title="class in org.apache.drill.exec.store.http.util">HttpProxyConfig</a>&nbsp;proxyConfig,
<a href="../../../../../../../org/apache/drill/common/exceptions/CustomErrorContext.html" title="interface in org.apache.drill.common.exceptions">CustomErrorContext</a>&nbsp;errorContext,
<a href="../../../../../../../org/apache/drill/exec/store/http/paginator/Paginator.html" title="class in org.apache.drill.exec.store.http.paginator">Paginator</a>&nbsp;paginator)</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/store/http/util/SimpleHttp.html#addProxyInfo-okhttp3.OkHttpClient.Builder-org.apache.drill.exec.store.http.util.HttpProxyConfig-">addProxyInfo</a></span>(okhttp3.OkHttpClient.Builder&nbsp;builder,
<a href="../../../../../../../org/apache/drill/exec/store/http/util/HttpProxyConfig.html" title="class in org.apache.drill.exec.store.http.util">HttpProxyConfig</a>&nbsp;proxyConfig)</code>
<div class="block">Applies the proxy configuration to the OkHttp3 builder.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../../../org/apache/drill/exec/store/http/util/SimpleHttp.SimpleHttpBuilder.html" title="class in org.apache.drill.exec.store.http.util">SimpleHttp.SimpleHttpBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/store/http/util/SimpleHttp.html#builder--">builder</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/store/http/util/SimpleHttp.html#close--">close</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/store/http/util/SimpleHttp.html#decodedURL-okhttp3.HttpUrl-">decodedURL</a></span>(okhttp3.HttpUrl&nbsp;url)</code>
<div class="block">Returns the URL-decoded URL.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/store/http/util/SimpleHttp.html#getDefaultParameterValue-okhttp3.HttpUrl-java.lang.String-">getDefaultParameterValue</a></span>(okhttp3.HttpUrl&nbsp;url,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;parameter)</code>
<div class="block">This function is used to extract the default parameter supplied in a URL.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/store/http/util/SimpleHttp.html#getInputStream--">getInputStream</a></span>()</code>
<div class="block">Returns an InputStream based on the URL and config in the scanSpec.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/store/http/util/SimpleHttp.html#getResponseCode--">getResponseCode</a></span>()</code>
<div class="block">Gets the HTTP response code from the HTTP call.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/store/http/util/SimpleHttp.html#getResponseMessage--">getResponseMessage</a></span>()</code>
<div class="block">Gets the HTTP response code from the HTTP call.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/store/http/util/SimpleHttp.html#getResponseProtocol--">getResponseProtocol</a></span>()</code>
<div class="block">Gets the HTTP response code from the HTTP call.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/store/http/util/SimpleHttp.html#getResponseURL--">getResponseURL</a></span>()</code>
<div class="block">Gets the HTTP response code from the HTTP call.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/store/http/util/SimpleHttp.html#getURLParameters-okhttp3.HttpUrl-">getURLParameters</a></span>(okhttp3.HttpUrl&nbsp;url)</code>
<div class="block">APIs are sometimes structured with parameters in the URL itself.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/store/http/util/SimpleHttp.html#hasURLParameters-okhttp3.HttpUrl-">hasURLParameters</a></span>(okhttp3.HttpUrl&nbsp;url)</code>
<div class="block">Returns true if the url has url parameters, as indicated by the presence of
{param} in a url.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/store/http/util/SimpleHttp.html#mapURLParameters-okhttp3.HttpUrl-java.util.Map-">mapURLParameters</a></span>(okhttp3.HttpUrl&nbsp;url,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;filters)</code>
<div class="block">Used for APIs which have parameters in the URL.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/drill/exec/store/http/util/SimpleHttp.html#url--">url</a></span>()</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="SimpleHttp-org.apache.drill.exec.store.http.HttpSubScan-okhttp3.HttpUrl-java.io.File-org.apache.drill.exec.store.http.util.HttpProxyConfig-org.apache.drill.common.exceptions.CustomErrorContext-org.apache.drill.exec.store.http.paginator.Paginator-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>SimpleHttp</h4>
<pre>public&nbsp;SimpleHttp(<a href="../../../../../../../org/apache/drill/exec/store/http/HttpSubScan.html" title="class in org.apache.drill.exec.store.http">HttpSubScan</a>&nbsp;scanDefn,
okhttp3.HttpUrl&nbsp;url,
<a href="https://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;tempDir,
<a href="../../../../../../../org/apache/drill/exec/store/http/util/HttpProxyConfig.html" title="class in org.apache.drill.exec.store.http.util">HttpProxyConfig</a>&nbsp;proxyConfig,
<a href="../../../../../../../org/apache/drill/common/exceptions/CustomErrorContext.html" title="interface in org.apache.drill.common.exceptions">CustomErrorContext</a>&nbsp;errorContext,
<a href="../../../../../../../org/apache/drill/exec/store/http/paginator/Paginator.html" title="class in org.apache.drill.exec.store.http.paginator">Paginator</a>&nbsp;paginator)</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="builder--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>builder</h4>
<pre>public static&nbsp;<a href="../../../../../../../org/apache/drill/exec/store/http/util/SimpleHttp.SimpleHttpBuilder.html" title="class in org.apache.drill.exec.store.http.util">SimpleHttp.SimpleHttpBuilder</a>&nbsp;builder()</pre>
</li>
</ul>
<a name="url--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>url</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;url()</pre>
</li>
</ul>
<a name="addProxyInfo-okhttp3.OkHttpClient.Builder-org.apache.drill.exec.store.http.util.HttpProxyConfig-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addProxyInfo</h4>
<pre>public static&nbsp;void&nbsp;addProxyInfo(okhttp3.OkHttpClient.Builder&nbsp;builder,
<a href="../../../../../../../org/apache/drill/exec/store/http/util/HttpProxyConfig.html" title="class in org.apache.drill.exec.store.http.util">HttpProxyConfig</a>&nbsp;proxyConfig)</pre>
<div class="block">Applies the proxy configuration to the OkHttp3 builder. This ensures that proxy configurations
will be consistent across HTTP REST connections.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>builder</code> - The input OkHttp3 builder</dd>
<dd><code>proxyConfig</code> - The proxy configuration</dd>
</dl>
</li>
</ul>
<a name="getInputStream--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInputStream</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;getInputStream()</pre>
<div class="block">Returns an InputStream based on the URL and config in the scanSpec. If anything goes wrong
the method throws a UserException.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>An Inputstream of the data from the URL call. The caller is responsible for calling
close() on the InputStream.</dd>
</dl>
</li>
</ul>
<a name="getResponseCode--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getResponseCode</h4>
<pre>public&nbsp;int&nbsp;getResponseCode()</pre>
<div class="block">Gets the HTTP response code from the HTTP call. Note that this value
is only available after the getInputStream() method has been called.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>int value of the HTTP response code</dd>
</dl>
</li>
</ul>
<a name="getResponseMessage--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getResponseMessage</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getResponseMessage()</pre>
<div class="block">Gets the HTTP response code from the HTTP call. Note that this value
is only available after the getInputStream() method has been called.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>int of HTTP response code</dd>
</dl>
</li>
</ul>
<a name="getResponseProtocol--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getResponseProtocol</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getResponseProtocol()</pre>
<div class="block">Gets the HTTP response code from the HTTP call. Note that this value
is only available after the getInputStream() method has been called.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The HTTP response protocol</dd>
</dl>
</li>
</ul>
<a name="getResponseURL--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getResponseURL</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getResponseURL()</pre>
<div class="block">Gets the HTTP response code from the HTTP call. Note that this value
is only available after the getInputStream() method has been called.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The HTTP response URL</dd>
</dl>
</li>
</ul>
<a name="decodedURL-okhttp3.HttpUrl-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decodedURL</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;decodedURL(okhttp3.HttpUrl&nbsp;url)</pre>
<div class="block">Returns the URL-decoded URL. If the URL is invalid, return the original URL.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Returns the URL-decoded URL</dd>
</dl>
</li>
</ul>
<a name="hasURLParameters-okhttp3.HttpUrl-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasURLParameters</h4>
<pre>public static&nbsp;boolean&nbsp;hasURLParameters(okhttp3.HttpUrl&nbsp;url)</pre>
<div class="block">Returns true if the url has url parameters, as indicated by the presence of
{param} in a url.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>True if there are URL params, false if not</dd>
</dl>
</li>
</ul>
<a name="getURLParameters-okhttp3.HttpUrl-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getURLParameters</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;getURLParameters(okhttp3.HttpUrl&nbsp;url)</pre>
<div class="block">APIs are sometimes structured with parameters in the URL itself. For instance, to request a list of
an organization's repositories in github, the URL is: https://api.github.com/orgs/{org}/repos, where
you can replace the org with the actual organization name.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A list of URL parameters enclosed by curly braces.</dd>
</dl>
</li>
</ul>
<a name="getDefaultParameterValue-okhttp3.HttpUrl-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDefaultParameterValue</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getDefaultParameterValue(okhttp3.HttpUrl&nbsp;url,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;parameter)</pre>
<div class="block">This function is used to extract the default parameter supplied in a URL. For instance,
if the supplied URL is http://someapi.com/path/{p1=foo}, the function will return foo. If there
is not a matching parameter or no default value, the function will return null.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>url</code> - The URL containing a default parameter</dd>
<dd><code>parameter</code> - The parameter for which you need the value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The value for the supplied parameter</dd>
</dl>
</li>
</ul>
<a name="mapURLParameters-okhttp3.HttpUrl-java.util.Map-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>mapURLParameters</h4>
<pre>public static&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;mapURLParameters(okhttp3.HttpUrl&nbsp;url,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;filters)</pre>
<div class="block">Used for APIs which have parameters in the URL. This function maps the filters pushed down
from the query into the URL. For example the API: github.com/orgs/{org}/repos requires a user to
specify an organization and replace {org} with an actual organization. The filter is passed down from
the query.
Note that if a URL contains URL parameters and one is not provided in the filters, Drill will throw
a UserException.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>url</code> - The HttpUrl containing URL Parameters</dd>
<dd><code>filters</code> - A CaseInsensitiveMap of filters</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A string of the URL with the URL parameters replaced by filter values</dd>
</dl>
</li>
</ul>
<a name="close--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>close</h4>
<pre>public&nbsp;void&nbsp;close()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true#close--" title="class or interface in java.lang">close</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/SimpleHttp.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../../org/apache/drill/exec/store/http/util/HttpProxyConfig.ProxyType.html" title="enum in org.apache.drill.exec.store.http.util"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../../org/apache/drill/exec/store/http/util/SimpleHttp.BasicAuthInterceptor.html" title="class in org.apache.drill.exec.store.http.util"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/apache/drill/exec/store/http/util/SimpleHttp.html" target="_top">Frames</a></li>
<li><a href="SimpleHttp.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 1970 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>