Package org.azd.utils
Class BaseClient.StreamBuilder
java.lang.Object
org.azd.utils.BaseClient.StreamBuilder
- Enclosing class:
BaseClient
Deprecated.
Helper inner class for managing the response as stream.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpClient.RedirectDeprecated.static CompletableFuture<HttpResponse<InputStream>>response(RequestMethod requestMethod, String requestUrl, String token, String contentType, InputStream contentStream, Map<String, String> customHeaders) Deprecated.static InputStreamresponse(RequestMethod requestMethod, String requestUrl, String token, String contentType, InputStream contentStream, Map<String, String> customHeaders, boolean followRedirects) Deprecated.static voidsetRedirectPolicy(HttpClient.Redirect redirectPolicy) Deprecated.
-
Constructor Details
-
StreamBuilder
public StreamBuilder()Deprecated.
-
-
Method Details
-
getRedirectPolicy
Deprecated.Get the current redirect policy.- Returns:
- HttpClient.Redirect policy.
-
setRedirectPolicy
Deprecated.Set the current redirect policy.- Parameters:
redirectPolicy- HttpClient.Redirect policy.
-
response
@Deprecated public static InputStream response(RequestMethod requestMethod, String requestUrl, String token, String contentType, InputStream contentStream, Map<String, String> customHeaders, boolean followRedirects) Deprecated.Sends a POST request to REST API with basic authentication.- Parameters:
requestMethod- Type of request method - get, post, put, delete and patch.RequestMethod.requestUrl- pass the request url.token- pass the personal access token.contentType- Type of content to send and accept from API.contentStream- Request body as stream for post request.customHeaders- custom headers to send with the post request.followRedirects- if true follow the redirect URL.- Returns:
- Input stream response from the API.
-
response
@Deprecated public static CompletableFuture<HttpResponse<InputStream>> response(RequestMethod requestMethod, String requestUrl, String token, String contentType, InputStream contentStream, Map<String, String> customHeaders) Deprecated.Sends a POST request to REST API with basic authentication.- Parameters:
requestMethod- Type of request method - get, post, put, delete and patch.RequestMethod.requestUrl- pass the request url.token- pass the personal access token.contentType- Type of content to send and accept from API.contentStream- Request body as stream for post request.customHeaders- custom headers to send with the post request.- Returns:
- Input stream response from the API as CompletableFuture object.
-