Package io.pdfapi.client.http
Class AbstractHttpClient
java.lang.Object
io.pdfapi.client.http.AbstractHttpClient
- All Implemented Interfaces:
HttpClient
- Direct Known Subclasses:
ApacheHttpClient,OkHttpClient,RestTemplateHttpClient
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected abstract voidprotected abstract CompletableFuture<HttpResponse> executeGet(String url, Map<String, String> headers) protected abstract CompletableFuture<HttpResponse> protected abstract CompletableFuture<HttpResponse> executePost(String url, Map<String, String> headers, String fileName, InputStream content, String contentType, String partName) post(String url, Map<String, String> headers, String fileName, InputStream content, String contentType, String partName)
-
Constructor Details
-
AbstractHttpClient
public AbstractHttpClient()
-
-
Method Details
-
executePost
protected abstract CompletableFuture<HttpResponse> executePost(String url, Map<String, String> headers, String jsonBody) -
executePost
protected abstract CompletableFuture<HttpResponse> executePost(String url, Map<String, String> headers, String fileName, InputStream content, String contentType, String partName) -
executeGet
protected abstract CompletableFuture<HttpResponse> executeGet(String url, Map<String, String> headers) -
closeInternal
protected abstract void closeInternal() -
post
public CompletableFuture<HttpResponse> post(String url, Map<String, String> headers, String jsonBody) - Specified by:
postin interfaceHttpClient
-
post
public CompletableFuture<HttpResponse> post(String url, Map<String, String> headers, String fileName, InputStream content, String contentType, String partName) - Specified by:
postin interfaceHttpClient
-
get
- Specified by:
getin interfaceHttpClient
-
close
public void close()- Specified by:
closein interfaceHttpClient
-