Package io.pdfapi.client.http
Class OkHttpClient
java.lang.Object
io.pdfapi.client.http.AbstractHttpClient
io.pdfapi.client.http.OkHttpClient
- All Implemented Interfaces:
HttpClient
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected CompletableFuture<HttpResponse> executeGet(String url, Map<String, String> headers) protected CompletableFuture<HttpResponse> protected CompletableFuture<HttpResponse> executePost(String url, Map<String, String> headers, String fileName, InputStream content, String contentType, String partName) Methods inherited from class io.pdfapi.client.http.AbstractHttpClient
close, get, post, post
-
Constructor Details
-
OkHttpClient
public OkHttpClient(int timeoutSeconds) -
OkHttpClient
public OkHttpClient(okhttp3.OkHttpClient client)
-
-
Method Details
-
executePost
protected CompletableFuture<HttpResponse> executePost(String url, Map<String, String> headers, String jsonBody) - Specified by:
executePostin classAbstractHttpClient
-
executePost
protected CompletableFuture<HttpResponse> executePost(String url, Map<String, String> headers, String fileName, InputStream content, String contentType, String partName) - Specified by:
executePostin classAbstractHttpClient
-
executeGet
- Specified by:
executeGetin classAbstractHttpClient
-
closeInternal
protected void closeInternal()- Specified by:
closeInternalin classAbstractHttpClient
-