public abstract class AbstractRequest<T> extends Object implements IRequest<T>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractRequest.Builder<T,BT extends AbstractRequest.Builder<T,?>> |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRequest(AbstractRequest.Builder<T,?> builder) |
| Modifier and Type | Method and Description |
|---|---|
String |
bodyParametersToJson(List<org.apache.hc.core5.http.NameValuePair> bodyParameters) |
String |
deleteJson() |
CompletableFuture<T> |
executeAsync()
Get something asynchronously.
|
org.apache.hc.core5.http.HttpEntity |
getBody() |
List<org.apache.hc.core5.http.NameValuePair> |
getBodyParameters() |
org.apache.hc.core5.http.ContentType |
getContentType() |
List<org.apache.hc.core5.http.Header> |
getHeaders() |
IHttpManager |
getHttpManager() |
String |
getJson() |
URI |
getUri() |
void |
initializeBody() |
String |
postJson() |
String |
putJson() |
protected AbstractRequest(AbstractRequest.Builder<T,?> builder)
public CompletableFuture<T> executeAsync()
executeAsync in interface IRequest<T>CompletableFuture for a generic.public void initializeBody()
public String bodyParametersToJson(List<org.apache.hc.core5.http.NameValuePair> bodyParameters)
public String getJson() throws IOException, SpotifyWebApiException, org.apache.hc.core5.http.ParseException
getJson in interface IRequest<T>IOExceptionSpotifyWebApiExceptionorg.apache.hc.core5.http.ParseExceptionpublic String postJson() throws IOException, SpotifyWebApiException, org.apache.hc.core5.http.ParseException
postJson in interface IRequest<T>IOExceptionSpotifyWebApiExceptionorg.apache.hc.core5.http.ParseExceptionpublic String putJson() throws IOException, SpotifyWebApiException, org.apache.hc.core5.http.ParseException
putJson in interface IRequest<T>IOExceptionSpotifyWebApiExceptionorg.apache.hc.core5.http.ParseExceptionpublic String deleteJson() throws IOException, SpotifyWebApiException, org.apache.hc.core5.http.ParseException
deleteJson in interface IRequest<T>IOExceptionSpotifyWebApiExceptionorg.apache.hc.core5.http.ParseExceptionpublic IHttpManager getHttpManager()
getHttpManager in interface IRequest<T>public List<org.apache.hc.core5.http.Header> getHeaders()
getHeaders in interface IRequest<T>public org.apache.hc.core5.http.ContentType getContentType()
getContentType in interface IRequest<T>public org.apache.hc.core5.http.HttpEntity getBody()
public List<org.apache.hc.core5.http.NameValuePair> getBodyParameters()
getBodyParameters in interface IRequest<T>Copyright © 2020. All rights reserved.