Class AbstractRequest<T>
java.lang.Object
se.michaelthelin.spotify.requests.AbstractRequest<T>
- All Implemented Interfaces:
IRequest<T>
- Direct Known Subclasses:
AbstractAuthorizationRequest
,AbstractDataRequest
,AuthorizationCodePKCERefreshRequest
,AuthorizationCodePKCERequest
,AuthorizationCodeUriRequest
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
AbstractRequest.Builder<T,
BT extends AbstractRequest.Builder<T, ?>> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbodyParametersToJson
(List<org.apache.hc.core5.http.NameValuePair> bodyParameters) Get something asynchronously.org.apache.hc.core5.http.HttpEntity
getBody()
List
<org.apache.hc.core5.http.NameValuePair> org.apache.hc.core5.http.ContentType
List
<org.apache.hc.core5.http.Header> getJson()
getUri()
void
postJson()
putJson()
-
Constructor Details
-
AbstractRequest
-
-
Method Details
-
executeAsync
Get something asynchronously.- Specified by:
executeAsync
in interfaceIRequest<T>
- Returns:
- A
CompletableFuture
for a generic.
-
initializeBody
public void initializeBody() -
bodyParametersToJson
-
getJson
public String getJson() throws IOException, SpotifyWebApiException, org.apache.hc.core5.http.ParseException- Specified by:
getJson
in interfaceIRequest<T>
- Throws:
IOException
SpotifyWebApiException
org.apache.hc.core5.http.ParseException
-
postJson
public String postJson() throws IOException, SpotifyWebApiException, org.apache.hc.core5.http.ParseException- Specified by:
postJson
in interfaceIRequest<T>
- Throws:
IOException
SpotifyWebApiException
org.apache.hc.core5.http.ParseException
-
putJson
public String putJson() throws IOException, SpotifyWebApiException, org.apache.hc.core5.http.ParseException- Specified by:
putJson
in interfaceIRequest<T>
- Throws:
IOException
SpotifyWebApiException
org.apache.hc.core5.http.ParseException
-
deleteJson
public String deleteJson() throws IOException, SpotifyWebApiException, org.apache.hc.core5.http.ParseException- Specified by:
deleteJson
in interfaceIRequest<T>
- Throws:
IOException
SpotifyWebApiException
org.apache.hc.core5.http.ParseException
-
getHttpManager
- Specified by:
getHttpManager
in interfaceIRequest<T>
-
getUri
-
getHeaders
- Specified by:
getHeaders
in interfaceIRequest<T>
-
getContentType
public org.apache.hc.core5.http.ContentType getContentType()- Specified by:
getContentType
in interfaceIRequest<T>
-
getBody
public org.apache.hc.core5.http.HttpEntity getBody() -
getBodyParameters
- Specified by:
getBodyParameters
in interfaceIRequest<T>
-