Package org.azd.utils

Class BaseClient.StreamBuilder

java.lang.Object
org.azd.utils.BaseClient.StreamBuilder
Enclosing class:
BaseClient

@Deprecated public abstract static class BaseClient.StreamBuilder extends Object
Deprecated.
Helper inner class for managing the response as stream.
  • Constructor Details

    • StreamBuilder

      public StreamBuilder()
      Deprecated.
  • Method Details

    • getRedirectPolicy

      @Deprecated public static HttpClient.Redirect getRedirectPolicy()
      Deprecated.
      Get the current redirect policy.
      Returns:
      HttpClient.Redirect policy.
    • setRedirectPolicy

      @Deprecated public static void setRedirectPolicy(HttpClient.Redirect redirectPolicy)
      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.