public class SpotifyHttpManager extends Object implements IHttpManager
| Modifier and Type | Class and Description |
|---|---|
static class |
SpotifyHttpManager.Builder |
| Constructor and Description |
|---|
SpotifyHttpManager(SpotifyHttpManager.Builder builder)
Construct a new SpotifyHttpManager instance.
|
| Modifier and Type | Method and Description |
|---|---|
String |
delete(URI uri,
org.apache.hc.core5.http.Header[] headers,
org.apache.hc.core5.http.HttpEntity body)
Perform an HTTP DELETE request to the specified URL.
|
String |
get(URI uri,
org.apache.hc.core5.http.Header[] headers)
Perform an HTTP GET request to the specified URL.
|
Integer |
getCacheMaxEntries() |
Integer |
getCacheMaxObjectSize() |
Integer |
getConnectionRequestTimeout() |
Integer |
getConnectTimeout() |
org.apache.hc.core5.http.HttpHost |
getProxy() |
org.apache.hc.client5.http.auth.UsernamePasswordCredentials |
getProxyCredentials() |
Integer |
getSocketTimeout() |
static URI |
makeUri(String uriString) |
String |
post(URI uri,
org.apache.hc.core5.http.Header[] headers,
org.apache.hc.core5.http.HttpEntity body)
Perform an HTTP POST request to the specified URL.
|
String |
put(URI uri,
org.apache.hc.core5.http.Header[] headers,
org.apache.hc.core5.http.HttpEntity body)
Perform an HTTP PUT request to the specified URL.
|
public SpotifyHttpManager(SpotifyHttpManager.Builder builder)
builder - The builder.public org.apache.hc.core5.http.HttpHost getProxy()
public org.apache.hc.client5.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.hc.core5.http.Header[] headers) throws IOException, SpotifyWebApiException, org.apache.hc.core5.http.ParseException
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.org.apache.hc.core5.http.ParseException - The response could not be parsed as a string.public String post(URI uri, org.apache.hc.core5.http.Header[] headers, org.apache.hc.core5.http.HttpEntity body) throws IOException, SpotifyWebApiException, org.apache.hc.core5.http.ParseException
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.org.apache.hc.core5.http.ParseException - The response could not be parsed as a string.public String put(URI uri, org.apache.hc.core5.http.Header[] headers, org.apache.hc.core5.http.HttpEntity body) throws IOException, SpotifyWebApiException, org.apache.hc.core5.http.ParseException
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.org.apache.hc.core5.http.ParseException - The response could not be parsed as a string.public String delete(URI uri, org.apache.hc.core5.http.Header[] headers, org.apache.hc.core5.http.HttpEntity body) throws IOException, SpotifyWebApiException, org.apache.hc.core5.http.ParseException
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.org.apache.hc.core5.http.ParseException - The response could not be parsed as a string.Copyright © 2020. All rights reserved.