<!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 (1.8.0_301) on Fri May 20 18:15:06 EDT 2022 -->
<title>HttpService (Brightcove Player SDK for Android 6.18.4 API)</title>
<meta name="date" content="2022-05-20">
<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="HttpService (Brightcove Player SDK for Android 6.18.4 API)";
        }
    }
    catch(err) {
    }
//-->
var methods = {"i0":9,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":9,"i16":9,"i17":9,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":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="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="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../com/brightcove/player/network/IDownloadManager.html" title="interface in com.brightcove.player.network"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/brightcove/player/network/HttpService.html" target="_top">Frames</a></li>
<li><a href="HttpService.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>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&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><a href="#field.detail">Field</a>&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">com.brightcove.player.network</div>
<h2 title="Class HttpService" class="title">Class HttpService</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>com.brightcove.player.network.HttpService</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">HttpService</span>
extends java.lang.Object</pre>
<div class="block">HttpService provides the basic tools to construct URLs properly, and issue HTTP requests,
 especially those that yield a JSON response.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#DEFAULT_CONNECT_TIMEOUT">DEFAULT_CONNECT_TIMEOUT</a></span></code>
<div class="block">Default connection timeout used by HttpService if none is given</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#DEFAULT_READ_TIMEOUT">DEFAULT_READ_TIMEOUT</a></span></code>
<div class="block">Default read timeout used by HttpService if none is given</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#TAG">TAG</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="../../../../com/brightcove/player/network/HttpService.html#HttpService--">HttpService</a></span>()</code>
<div class="block">When using the default constructor, DEFAULT_CONNECT_TIMEOUT and DEFAULT_READ_TIMEOUT are
 used for the timeout values.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#HttpService-int-int-">HttpService</a></span>(int&nbsp;connectTimeout,
           int&nbsp;readTimeout)</code>
<div class="block">Provides values for the connection timeout and read timeouts on instantiation.</div>
</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 java.net.URI</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#buildURIWithQueryParameters-java.lang.String-java.util.Map-">buildURIWithQueryParameters</a></span>(java.lang.String&nbsp;baseUri,
                           java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;parameters)</code>
<div class="block">Convenience method to construct a URL object from a base URL string and a Map of query
 string parameters.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#doDeleteRequest-java.net.URI-java.util.Map-">doDeleteRequest</a></span>(java.net.URI&nbsp;uri,
               java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;headers)</code>
<div class="block">Performs an HTTP PUT request using the given URI.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#doGetRequest-java.net.URI-">doGetRequest</a></span>(java.net.URI&nbsp;uri)</code>
<div class="block">Performs an HTTP GET request using the given URI.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#doGetRequest-java.net.URI-java.util.Map-">doGetRequest</a></span>(java.net.URI&nbsp;uri,
            java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;headers)</code>
<div class="block">Performs an HTTP GET request using the given URI.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>android.graphics.Bitmap</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#doImageGetRequest-java.net.URI-">doImageGetRequest</a></span>(java.net.URI&nbsp;uri)</code>
<div class="block">Performs and HTTP GET request expecting a bitmap image file in the response.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>android.graphics.Bitmap</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#doImageGetRequest-java.net.URI-int-int-">doImageGetRequest</a></span>(java.net.URI&nbsp;uri,
                 int&nbsp;maxWidth,
                 int&nbsp;maxHeight)</code>
<div class="block">Performs and HTTP GET request expecting a bitmap image file in the response.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>org.json.JSONObject</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#doJSONGetRequest-java.net.URI-">doJSONGetRequest</a></span>(java.net.URI&nbsp;uri)</code>
<div class="block">Performs an HTTP GET request assuming that the response body will contain a valid JSON
 document.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>org.json.JSONObject</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#doJSONGetRequest-java.net.URI-java.util.Map-">doJSONGetRequest</a></span>(java.net.URI&nbsp;uri,
                java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;headers)</code>
<div class="block">Performs an HTTP GET request assuming that the response body will contain a valid JSON
 document.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>org.json.JSONObject</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#doJSONPostRequest-java.net.URI-">doJSONPostRequest</a></span>(java.net.URI&nbsp;uri)</code>
<div class="block">Performs an HTTP POST request assuming that the response body will contain a valid JSON
 document.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>org.json.JSONObject</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#doJSONPostRequest-java.net.URI-java.util.Map-">doJSONPostRequest</a></span>(java.net.URI&nbsp;uri,
                 java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;headers)</code>
<div class="block">Performs an HTTP POST request assuming that the response body will contain a valid JSON
 document.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>org.json.JSONObject</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#doJSONPostRequest-java.net.URI-java.util.Map-java.lang.String-">doJSONPostRequest</a></span>(java.net.URI&nbsp;uri,
                 java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;headers,
                 java.lang.String&nbsp;requestBody)</code>&nbsp;</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#doPostRequest-java.net.URI-">doPostRequest</a></span>(java.net.URI&nbsp;uri)</code>
<div class="block">Performs an HTTP POST request using the given URI.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#doPostRequest-java.net.URI-java.util.Map-">doPostRequest</a></span>(java.net.URI&nbsp;uri,
             java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;headers)</code>
<div class="block">Performs an HTTP POST request using the given URI.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#getConnectTimeout--">getConnectTimeout</a></span>()</code>
<div class="block">Retrieves the connection timeout used by this HttpService.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#getReadTimeout--">getReadTimeout</a></span>()</code>
<div class="block">Retrieves the read timeout used by this HttpService.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#inputStreamToString-java.io.InputStream-">inputStreamToString</a></span>(java.io.InputStream&nbsp;inputStream)</code>
<div class="block">Reads all data from the given InputStream and converts to a String (Uses StringBuilder).</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>static org.json.JSONObject</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#parseToJSONObject-java.lang.String-">parseToJSONObject</a></span>(java.lang.String&nbsp;jsonString)</code>
<div class="block">Parses given string containing JSON data into a JSONObject which provides an interface
 for extracting JSON data.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#readerToString-java.io.Reader-">readerToString</a></span>(java.io.Reader&nbsp;reader)</code>
<div class="block">Reads all data from the given Reader and converts to a String (Uses StringBuilder).</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code><a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network">HttpResponse</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#runDeleteRequest-java.net.URI-java.util.Map-">runDeleteRequest</a></span>(java.net.URI&nbsp;uri,
                java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;headers)</code>
<div class="block">This is the same as {<a href="../../../../com/brightcove/player/network/HttpService.html#doDeleteRequest-java.net.URI-java.util.Map-"><code>doDeleteRequest(URI, Map)</code></a>} but returns
 a {{<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network"><code>HttpResponse</code></a>} instead.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code><a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network">HttpResponse</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#runGetRequest-java.net.URI-">runGetRequest</a></span>(java.net.URI&nbsp;uri)</code>
<div class="block">This is the same as {<a href="../../../../com/brightcove/player/network/HttpService.html#doGetRequest-java.net.URI-"><code>doGetRequest(URI)</code></a>} but returns
 a {{<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network"><code>HttpResponse</code></a>} instead.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code><a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network">HttpResponse</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#runGetRequest-java.net.URI-java.util.Map-">runGetRequest</a></span>(java.net.URI&nbsp;uri,
             java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;headers)</code>
<div class="block">This is the same as {<a href="../../../../com/brightcove/player/network/HttpService.html#doGetRequest-java.net.URI-java.util.Map-"><code>doGetRequest(URI, Map)</code></a>} but returns
 a {{<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network"><code>HttpResponse</code></a>} instead.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code><a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network">HttpResponse</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#runJSONGetRequest-java.net.URI-">runJSONGetRequest</a></span>(java.net.URI&nbsp;uri)</code>
<div class="block">Same as {<a href="../../../../com/brightcove/player/network/HttpService.html#doJSONGetRequest-java.net.URI-"><code>doJSONGetRequest(URI)</code></a>} but this returns a {{<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network"><code>HttpResponse</code></a>}} instead.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code><a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network">HttpResponse</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#runJSONGetRequest-java.net.URI-java.util.Map-">runJSONGetRequest</a></span>(java.net.URI&nbsp;uri,
                 java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;headers)</code>
<div class="block">Same as {<a href="../../../../com/brightcove/player/network/HttpService.html#doJSONGetRequest-java.net.URI-java.util.Map-"><code>doJSONGetRequest(URI, Map)</code></a> )}} but this returns a {{<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network"><code>HttpResponse</code></a>}} instead.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code><a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network">HttpResponse</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#runJSONPostRequest-java.net.URI-">runJSONPostRequest</a></span>(java.net.URI&nbsp;uri)</code>
<div class="block">Same as {<a href="../../../../com/brightcove/player/network/HttpService.html#doJSONPostRequest-java.net.URI-"><code>doJSONPostRequest(URI)</code></a>} but this returns a {{<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network"><code>HttpResponse</code></a>}} instead.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code><a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network">HttpResponse</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#runJSONPostRequest-java.net.URI-java.util.Map-">runJSONPostRequest</a></span>(java.net.URI&nbsp;uri,
                  java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;headers)</code>
<div class="block">Same as {<a href="../../../../com/brightcove/player/network/HttpService.html#doJSONPostRequest-java.net.URI-java.util.Map-"><code>doJSONPostRequest(URI, Map)</code></a>} but this returns a {{<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network"><code>HttpResponse</code></a>}} instead.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code><a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network">HttpResponse</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#runJSONPostRequest-java.net.URI-java.util.Map-java.lang.String-">runJSONPostRequest</a></span>(java.net.URI&nbsp;uri,
                  java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;headers,
                  java.lang.String&nbsp;requestBody)</code>&nbsp;</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code><a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network">HttpResponse</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/brightcove/player/network/HttpService.html#runPostRequest-java.net.URI-java.util.Map-">runPostRequest</a></span>(java.net.URI&nbsp;uri,
              java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;headers)</code>
<div class="block">This is the same as {<a href="../../../../com/brightcove/player/network/HttpService.html#doPostRequest-java.net.URI-"><code>doPostRequest(URI)</code></a>} but returns
 a {{<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network"><code>HttpResponse</code></a>} instead.</div>
</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.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a name="TAG">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TAG</h4>
<pre>public static final&nbsp;java.lang.String TAG</pre>
</li>
</ul>
<a name="DEFAULT_CONNECT_TIMEOUT">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_CONNECT_TIMEOUT</h4>
<pre>public static final&nbsp;int DEFAULT_CONNECT_TIMEOUT</pre>
<div class="block">Default connection timeout used by HttpService if none is given</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#com.brightcove.player.network.HttpService.DEFAULT_CONNECT_TIMEOUT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_READ_TIMEOUT">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DEFAULT_READ_TIMEOUT</h4>
<pre>public static final&nbsp;int DEFAULT_READ_TIMEOUT</pre>
<div class="block">Default read timeout used by HttpService if none is given</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#com.brightcove.player.network.HttpService.DEFAULT_READ_TIMEOUT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="HttpService--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HttpService</h4>
<pre>public&nbsp;HttpService()</pre>
<div class="block">When using the default constructor, DEFAULT_CONNECT_TIMEOUT and DEFAULT_READ_TIMEOUT are
 used for the timeout values.</div>
</li>
</ul>
<a name="HttpService-int-int-">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>HttpService</h4>
<pre>public&nbsp;HttpService(int&nbsp;connectTimeout,
                   int&nbsp;readTimeout)</pre>
<div class="block">Provides values for the connection timeout and read timeouts on instantiation.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>connectTimeout</code> - the connection timeout for the underlying HttpURLConnection, in
                       milliseconds</dd>
<dd><code>readTimeout</code> - the read timeout for the underlying HttpURLConnection, in milliseconds</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><code>HttpURLConnection</code></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="getConnectTimeout--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConnectTimeout</h4>
<pre>public&nbsp;int&nbsp;getConnectTimeout()</pre>
<div class="block">Retrieves the connection timeout used by this HttpService.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the connection timeout in milliseconds</dd>
</dl>
</li>
</ul>
<a name="getReadTimeout--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getReadTimeout</h4>
<pre>public&nbsp;int&nbsp;getReadTimeout()</pre>
<div class="block">Retrieves the read timeout used by this HttpService.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the read timeout in milliseconds</dd>
</dl>
</li>
</ul>
<a name="buildURIWithQueryParameters-java.lang.String-java.util.Map-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buildURIWithQueryParameters</h4>
<pre>public static&nbsp;java.net.URI&nbsp;buildURIWithQueryParameters(java.lang.String&nbsp;baseUri,
                                                       java.util.Map&lt;java.lang.String,java.lang.Object&gt;&nbsp;parameters)
                                                throws java.net.URISyntaxException,
                                                       java.io.UnsupportedEncodingException</pre>
<div class="block">Convenience method to construct a URL object from a base URL string and a Map of query
 string parameters.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>baseUri</code> - the scheme, hostname, and path portions of the URI to construct</dd>
<dd><code>parameters</code> - the query string parameters to be included in the URI (will be URI encoded)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the fully populated URI</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.net.URISyntaxException</code> - if the base URI is malformed</dd>
<dd><code>java.io.UnsupportedEncodingException</code></dd>
</dl>
</li>
</ul>
<a name="doGetRequest-java.net.URI-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doGetRequest</h4>
<pre>public&nbsp;java.lang.String&nbsp;doGetRequest(java.net.URI&nbsp;uri)
                              throws java.io.IOException</pre>
<div class="block">Performs an HTTP GET request using the given URI.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - the request URI</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a String containing the response body of the HTTP GET request</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="runGetRequest-java.net.URI-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>runGetRequest</h4>
<pre>public&nbsp;<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network">HttpResponse</a>&nbsp;runGetRequest(java.net.URI&nbsp;uri)
                           throws java.io.IOException</pre>
<div class="block">This is the same as {<a href="../../../../com/brightcove/player/network/HttpService.html#doGetRequest-java.net.URI-"><code>doGetRequest(URI)</code></a>} but returns
 a {{<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network"><code>HttpResponse</code></a>} instead.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - the request URI</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a String containing the response body of the HTTP GET request</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="doGetRequest-java.net.URI-java.util.Map-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doGetRequest</h4>
<pre>public&nbsp;java.lang.String&nbsp;doGetRequest(java.net.URI&nbsp;uri,
                                     java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;headers)
                              throws java.io.IOException</pre>
<div class="block">Performs an HTTP GET request using the given URI.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - the request URI</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a String containing the response body of the HTTP GET request</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="runGetRequest-java.net.URI-java.util.Map-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>runGetRequest</h4>
<pre>public&nbsp;<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network">HttpResponse</a>&nbsp;runGetRequest(java.net.URI&nbsp;uri,
                                  java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;headers)
                           throws java.io.IOException</pre>
<div class="block">This is the same as {<a href="../../../../com/brightcove/player/network/HttpService.html#doGetRequest-java.net.URI-java.util.Map-"><code>doGetRequest(URI, Map)</code></a>} but returns
 a {{<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network"><code>HttpResponse</code></a>} instead.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - the request URI</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a String containing the response body of the HTTP GET request</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="doPostRequest-java.net.URI-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doPostRequest</h4>
<pre>public&nbsp;java.lang.String&nbsp;doPostRequest(java.net.URI&nbsp;uri)
                               throws java.io.IOException</pre>
<div class="block">Performs an HTTP POST request using the given URI.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - the request URI</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a String containing the response body of the HTTP POST request</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="runPostRequest-java.net.URI-java.util.Map-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>runPostRequest</h4>
<pre>public&nbsp;<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network">HttpResponse</a>&nbsp;runPostRequest(java.net.URI&nbsp;uri,
                                   java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;headers)
                            throws java.io.IOException</pre>
<div class="block">This is the same as {<a href="../../../../com/brightcove/player/network/HttpService.html#doPostRequest-java.net.URI-"><code>doPostRequest(URI)</code></a>} but returns
 a {{<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network"><code>HttpResponse</code></a>} instead.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - the request URI</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a String containing the response body of the HTTP POST request</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="doPostRequest-java.net.URI-java.util.Map-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doPostRequest</h4>
<pre>public&nbsp;java.lang.String&nbsp;doPostRequest(java.net.URI&nbsp;uri,
                                      java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;headers)
                               throws java.io.IOException</pre>
<div class="block">Performs an HTTP POST request using the given URI.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - the request URI</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a String containing the response body of the HTTP POST request</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="doDeleteRequest-java.net.URI-java.util.Map-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doDeleteRequest</h4>
<pre>public&nbsp;java.lang.String&nbsp;doDeleteRequest(java.net.URI&nbsp;uri,
                                        java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;headers)
                                 throws java.io.IOException</pre>
<div class="block">Performs an HTTP PUT request using the given URI.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - the request URI</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a String containing the response body of the HTTP PUT request</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="runDeleteRequest-java.net.URI-java.util.Map-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>runDeleteRequest</h4>
<pre>public&nbsp;<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network">HttpResponse</a>&nbsp;runDeleteRequest(java.net.URI&nbsp;uri,
                                     java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;headers)
                              throws java.io.IOException</pre>
<div class="block">This is the same as {<a href="../../../../com/brightcove/player/network/HttpService.html#doDeleteRequest-java.net.URI-java.util.Map-"><code>doDeleteRequest(URI, Map)</code></a>} but returns
 a {{<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network"><code>HttpResponse</code></a>} instead.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - the request URI</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a String containing the response body of the HTTP PUT request</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="doImageGetRequest-java.net.URI-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doImageGetRequest</h4>
<pre>public&nbsp;android.graphics.Bitmap&nbsp;doImageGetRequest(java.net.URI&nbsp;uri)
                                          throws java.io.IOException</pre>
<div class="block">Performs and HTTP GET request expecting a bitmap image file in the response.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - the request URI</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a Bitmap decoded from the response content stream</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="doImageGetRequest-java.net.URI-int-int-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doImageGetRequest</h4>
<pre>public&nbsp;android.graphics.Bitmap&nbsp;doImageGetRequest(java.net.URI&nbsp;uri,
                                                 int&nbsp;maxWidth,
                                                 int&nbsp;maxHeight)
                                          throws java.io.IOException</pre>
<div class="block">Performs and HTTP GET request expecting a bitmap image file in the response.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - the request URI</dd>
<dd><code>maxWidth</code> - The maximum width of the target view.</dd>
<dd><code>maxHeight</code> - The maximum height of the target view.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a Bitmap decoded from the response content stream</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="doJSONGetRequest-java.net.URI-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doJSONGetRequest</h4>
<pre>public&nbsp;org.json.JSONObject&nbsp;doJSONGetRequest(java.net.URI&nbsp;uri)
                                     throws java.io.IOException,
                                            org.json.JSONException</pre>
<div class="block">Performs an HTTP GET request assuming that the response body will contain a valid JSON
 document. The JSON document is parsed and returned as a JSONObject.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - the request URI</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a JSONObject created by parsing the HTTP response, or null if the response is empty</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
<dd><code>org.json.JSONException</code></dd>
</dl>
</li>
</ul>
<a name="doJSONGetRequest-java.net.URI-java.util.Map-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doJSONGetRequest</h4>
<pre>public&nbsp;org.json.JSONObject&nbsp;doJSONGetRequest(java.net.URI&nbsp;uri,
                                            java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;headers)
                                     throws java.io.IOException,
                                            org.json.JSONException</pre>
<div class="block">Performs an HTTP GET request assuming that the response body will contain a valid JSON
 document. The JSON document is parsed and returned as a JSONObject.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - the request URI</dd>
<dd><code>headers</code> - the request headers</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a JSONObject created by parsing the HTTP response, or null if the response is empty</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
<dd><code>org.json.JSONException</code></dd>
</dl>
</li>
</ul>
<a name="doJSONPostRequest-java.net.URI-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doJSONPostRequest</h4>
<pre>public&nbsp;org.json.JSONObject&nbsp;doJSONPostRequest(java.net.URI&nbsp;uri)
                                      throws java.io.IOException,
                                             org.json.JSONException</pre>
<div class="block">Performs an HTTP POST request assuming that the response body will contain a valid JSON
 document. The JSON document is parsed and returned as a JSONObject.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - the request URI</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a JSONObject created by parsing the HTTP response, or null if the response is empty</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
<dd><code>org.json.JSONException</code></dd>
</dl>
</li>
</ul>
<a name="doJSONPostRequest-java.net.URI-java.util.Map-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doJSONPostRequest</h4>
<pre>public&nbsp;org.json.JSONObject&nbsp;doJSONPostRequest(java.net.URI&nbsp;uri,
                                             java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;headers)
                                      throws java.io.IOException,
                                             org.json.JSONException</pre>
<div class="block">Performs an HTTP POST request assuming that the response body will contain a valid JSON
 document. The JSON document is parsed and returned as a JSONObject.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - the request URI</dd>
<dd><code>headers</code> - the request headers</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a JSONObject created by parsing the HTTP response, or null if the response is empty</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
<dd><code>org.json.JSONException</code></dd>
</dl>
</li>
</ul>
<a name="doJSONPostRequest-java.net.URI-java.util.Map-java.lang.String-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doJSONPostRequest</h4>
<pre>public&nbsp;org.json.JSONObject&nbsp;doJSONPostRequest(java.net.URI&nbsp;uri,
                                             java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;headers,
                                             java.lang.String&nbsp;requestBody)
                                      throws java.io.IOException,
                                             org.json.JSONException</pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
<dd><code>org.json.JSONException</code></dd>
</dl>
</li>
</ul>
<a name="runJSONGetRequest-java.net.URI-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>runJSONGetRequest</h4>
<pre>public&nbsp;<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network">HttpResponse</a>&nbsp;runJSONGetRequest(java.net.URI&nbsp;uri)
                               throws java.io.IOException,
                                      org.json.JSONException</pre>
<div class="block">Same as {<a href="../../../../com/brightcove/player/network/HttpService.html#doJSONGetRequest-java.net.URI-"><code>doJSONGetRequest(URI)</code></a>} but this returns a {{<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network"><code>HttpResponse</code></a>}} instead.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - the request URI</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a JSONObject created by parsing the HTTP response, or null if the response is empty</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
<dd><code>org.json.JSONException</code></dd>
</dl>
</li>
</ul>
<a name="runJSONGetRequest-java.net.URI-java.util.Map-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>runJSONGetRequest</h4>
<pre>public&nbsp;<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network">HttpResponse</a>&nbsp;runJSONGetRequest(java.net.URI&nbsp;uri,
                                      java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;headers)
                               throws java.io.IOException,
                                      org.json.JSONException</pre>
<div class="block">Same as {<a href="../../../../com/brightcove/player/network/HttpService.html#doJSONGetRequest-java.net.URI-java.util.Map-"><code>doJSONGetRequest(URI, Map)</code></a> )}} but this returns a {{<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network"><code>HttpResponse</code></a>}} instead.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - the request URI</dd>
<dd><code>headers</code> - the request headers</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a JSONObject created by parsing the HTTP response, or null if the response is empty</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
<dd><code>org.json.JSONException</code></dd>
</dl>
</li>
</ul>
<a name="runJSONPostRequest-java.net.URI-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>runJSONPostRequest</h4>
<pre>public&nbsp;<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network">HttpResponse</a>&nbsp;runJSONPostRequest(java.net.URI&nbsp;uri)
                                throws java.io.IOException,
                                       org.json.JSONException</pre>
<div class="block">Same as {<a href="../../../../com/brightcove/player/network/HttpService.html#doJSONPostRequest-java.net.URI-"><code>doJSONPostRequest(URI)</code></a>} but this returns a {{<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network"><code>HttpResponse</code></a>}} instead.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - the request URI</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a JSONObject created by parsing the HTTP response, or null if the response is empty</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
<dd><code>org.json.JSONException</code></dd>
</dl>
</li>
</ul>
<a name="runJSONPostRequest-java.net.URI-java.util.Map-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>runJSONPostRequest</h4>
<pre>public&nbsp;<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network">HttpResponse</a>&nbsp;runJSONPostRequest(java.net.URI&nbsp;uri,
                                       java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;headers)
                                throws java.io.IOException,
                                       org.json.JSONException</pre>
<div class="block">Same as {<a href="../../../../com/brightcove/player/network/HttpService.html#doJSONPostRequest-java.net.URI-java.util.Map-"><code>doJSONPostRequest(URI, Map)</code></a>} but this returns a {{<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network"><code>HttpResponse</code></a>}} instead.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>uri</code> - the request URI</dd>
<dd><code>headers</code> - the request headers</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a JSONObject created by parsing the HTTP response, or null if the response is empty</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
<dd><code>org.json.JSONException</code></dd>
</dl>
</li>
</ul>
<a name="runJSONPostRequest-java.net.URI-java.util.Map-java.lang.String-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>runJSONPostRequest</h4>
<pre>public&nbsp;<a href="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network">HttpResponse</a>&nbsp;runJSONPostRequest(java.net.URI&nbsp;uri,
                                       java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;headers,
                                       java.lang.String&nbsp;requestBody)
                                throws java.io.IOException,
                                       org.json.JSONException</pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
<dd><code>org.json.JSONException</code></dd>
</dl>
</li>
</ul>
<a name="inputStreamToString-java.io.InputStream-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>inputStreamToString</h4>
<pre>public static&nbsp;java.lang.String&nbsp;inputStreamToString(java.io.InputStream&nbsp;inputStream)
                                            throws java.io.IOException</pre>
<div class="block">Reads all data from the given InputStream and converts to a String (Uses StringBuilder).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>inputStream</code> - InputStream from which String should be built</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a String representation of the data provided by the InputStream</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="readerToString-java.io.Reader-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readerToString</h4>
<pre>public static&nbsp;java.lang.String&nbsp;readerToString(java.io.Reader&nbsp;reader)
                                       throws java.io.IOException</pre>
<div class="block">Reads all data from the given Reader and converts to a String (Uses StringBuilder).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reader</code> - Reader from which String should be built</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a String representation of the data provided by the Reader</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.io.IOException</code></dd>
</dl>
</li>
</ul>
<a name="parseToJSONObject-java.lang.String-">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>parseToJSONObject</h4>
<pre>public static&nbsp;org.json.JSONObject&nbsp;parseToJSONObject(java.lang.String&nbsp;jsonString)
                                             throws org.json.JSONException</pre>
<div class="block">Parses given string containing JSON data into a JSONObject which provides an interface
 for extracting JSON data. Note that this method only supports parsing JSON strings that
 are represented by a top-level object, i.e., starts with a curly brace. Top level arrays
 are not supported by this method (i.e., starts with square bracket).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>jsonString</code> - the JSON object data to be parsed (must not be null or empty)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the parsed JSONObject</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>org.json.JSONException</code> - if there are any issues parsing the JSON</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="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="../../../../com/brightcove/player/network/HttpResponse.html" title="class in com.brightcove.player.network"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../com/brightcove/player/network/IDownloadManager.html" title="interface in com.brightcove.player.network"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/brightcove/player/network/HttpService.html" target="_top">Frames</a></li>
<li><a href="HttpService.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>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&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><a href="#field.detail">Field</a>&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 ======= -->
</body>
</html>
