Package com.auth0.net
Class BaseRequest<T>
java.lang.Object
com.auth0.net.BaseRequest<T>
- All Implemented Interfaces:
Request<T>
- Direct Known Subclasses:
CustomRequest
,FormBodyRequest
,MultipartRequest
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract okhttp3.Request
execute()
Executes this request.Executes this request asynchronously.protected abstract T
parseResponse
(okhttp3.Response response)
-
Method Details
-
createRequest
- Throws:
Auth0Exception
-
parseResponse
- Throws:
Auth0Exception
-
execute
Executes this request.- Specified by:
execute
in interfaceRequest<T>
- Returns:
- the response body JSON decoded as T
- Throws:
Auth0Exception
- if the request execution fails.
-
executeAsync
Description copied from interface:Request
Executes this request asynchronously. Note: This method was added after the interface was released in version 1.0. It is defined as a default method for compatibility reasons. From version 2.0 on, the method will be abstract and all implementations of this interface will have to provide their own implementation. The default implementation throws an UnsupportedOperationException.- Specified by:
executeAsync
in interfaceRequest<T>
- Returns:
- a CompletableFuture representing the specified request.
-