Package com.inrupt.client.okhttp
Class OkHttpService
java.lang.Object
com.inrupt.client.okhttp.OkHttpService
- All Implemented Interfaces:
 HttpService
A 
HttpService using the okhttp3.OkHttpClient.- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic OkHttpServiceofOkHttpClient(okhttp3.OkHttpClient client) Create an HTTP client service with a pre-configuredOkHttpClient.<T> CompletionStage<Response<T>>send(Request request, Response.BodyHandler<T> handler) Perform an asynchonous HTTP request. 
- 
Constructor Details
- 
OkHttpService
public OkHttpService()Create an HTTP client service with a defaultOkHttpClient. 
 - 
 - 
Method Details
- 
send
Description copied from interface:HttpServicePerform an asynchonous HTTP request.- Specified by:
 sendin interfaceHttpService- Type Parameters:
 T- the response type- Parameters:
 request- the requesthandler- the response body handler- Returns:
 - the next stage of completion, containing the response
 
 - 
ofOkHttpClient
Create an HTTP client service with a pre-configuredOkHttpClient.- Parameters:
 client- the OkHttpClient- Returns:
 - an HTTP client service
 
 
 -