IHttpManagerpublic class SpotifyHttpManager extends Object implements IHttpManager
| Modifier and Type | Class | Description |
|---|---|---|
static class |
SpotifyHttpManager.Builder |
| Constructor | Description |
|---|---|
SpotifyHttpManager(SpotifyHttpManager.Builder builder) |
Construct a new SpotifyHttpManager instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
String |
delete(URI uri,
org.apache.http.Header[] headers,
org.apache.http.HttpEntity body) |
Perform an HTTP DELETE request to the specified URL.
|
String |
get(URI uri,
org.apache.http.Header[] headers) |
Perform an HTTP GET request to the specified URL.
|
Integer |
getCacheMaxEntries() |
|
Integer |
getCacheMaxObjectSize() |
|
Integer |
getConnectionRequestTimeout() |
|
Integer |
getConnectTimeout() |
|
org.apache.http.HttpHost |
getProxy() |
|
org.apache.http.auth.UsernamePasswordCredentials |
getProxyCredentials() |
|
Integer |
getSocketTimeout() |
|
static URI |
makeUri(String uriString) |
|
String |
post(URI uri,
org.apache.http.Header[] headers,
org.apache.http.HttpEntity body) |
Perform an HTTP POST request to the specified URL.
|
String |
put(URI uri,
org.apache.http.Header[] headers,
org.apache.http.HttpEntity body) |
Perform an HTTP PUT request to the specified URL.
|
public SpotifyHttpManager(SpotifyHttpManager.Builder builder)
builder - The builder.public org.apache.http.HttpHost getProxy()
public org.apache.http.auth.UsernamePasswordCredentials getProxyCredentials()
public Integer getCacheMaxEntries()
public Integer getCacheMaxObjectSize()
public Integer getConnectionRequestTimeout()
public Integer getConnectTimeout()
public Integer getSocketTimeout()
public String get(URI uri, org.apache.http.Header[] headers) throws IOException, SpotifyWebApiException
IHttpManagerget in interface IHttpManageruri - The GET request's URI.headers - The GET request's Headers.IOException - In case of networking issues.SpotifyWebApiException - The Web API returned an error further specified in this exception's root cause.public String post(URI uri, org.apache.http.Header[] headers, org.apache.http.HttpEntity body) throws IOException, SpotifyWebApiException
IHttpManagerpost in interface IHttpManageruri - The POST request's URI.headers - The POST request's Headers.body - The PUT request's body as a HttpEntity.IOException - In case of networking issues.SpotifyWebApiException - The Web API returned an error further specified in this exception's root cause.public String put(URI uri, org.apache.http.Header[] headers, org.apache.http.HttpEntity body) throws IOException, SpotifyWebApiException
IHttpManagerput in interface IHttpManageruri - The PUT request's URI.headers - The PUT request's Headers.body - The PUT request's body as a HttpEntity.IOException - In case of networking issues.SpotifyWebApiException - The Web API returned an error further specified in this exception's root cause.public String delete(URI uri, org.apache.http.Header[] headers, org.apache.http.HttpEntity body) throws IOException, SpotifyWebApiException
IHttpManagerdelete in interface IHttpManageruri - The DELETE request's URI.headers - The DELETE request's Headers.body - The DELETE request's body as a HttpEntity.IOException - In case of networking issues.SpotifyWebApiException - The Web API returned an error further specified in this exception's root cause.Copyright © 2019. All rights reserved.