Package org.azd.utils

Class BaseClient

java.lang.Object
org.azd.utils.BaseClient
Direct Known Subclasses:
Client

@Deprecated public abstract class BaseClient extends Object
Deprecated.
This is deprecated as of version 5.0.0
Implements HttpRequest request methods to send GET, POST, PATCH and DELETE request to Azure DevOps REST API.
  • Constructor Details

    • BaseClient

      public BaseClient()
      Deprecated.
  • Method Details

    • get

      @Deprecated public static String get(String requestUrl)
      Deprecated.
      Sends a GET request to REST API
      Parameters:
      requestUrl - pass the request url
      Returns:
      response string from the API
    • get

      @Deprecated public static String get(String requestUrl, String token)
      Deprecated.
      Sends a GET request to REST API with basic authentication
      Parameters:
      requestUrl - pass the request url
      token - pass the personal access token
      Returns:
      response string from the API
    • get

      @Deprecated public static String get(String requestUrl, String token, String contentType)
      Deprecated.
      Sends a GET request to REST API with basic authentication
      Parameters:
      requestUrl - pass the request url
      token - pass the personal access token
      contentType - specify the content type
      Returns:
      response string from the API
    • post

      @Deprecated public static String post(String requestUrl, String token, Map body) throws AzDException
      Deprecated.
      Sends a POST request to REST API with basic authentication and request body
      Parameters:
      requestUrl - pass the request url
      token - pass the personal access token
      body - pass the request body to post the request
      Returns:
      response string from the API if any
      Throws:
      AzDException - throws user friendly error message with error code from API
    • post

      @Deprecated public static String post(String requestUrl, String body)
      Deprecated.
      Sends a POST request to REST API with oauth authentication, content length of the request and request body
      Parameters:
      requestUrl - pass the request url
      body - pass the request body to post the request
      Returns:
      response string from the API if any
    • post

      @Deprecated public static String post(String requestUrl, String token, String body, String contentType) throws AzDException
      Deprecated.
      Sends a POST request to REST API with basic authentication and request body
      Parameters:
      requestUrl - pass the request url
      token - pass the personal access token
      body - pass the request body to post the request
      contentType - content type. E.g., application/json
      Returns:
      response string from the API if any
      Throws:
      AzDException - throws user friendly error message with error code from API
    • post

      @Deprecated public static String post(String requestUrl, String token, List<Object> body) throws AzDException
      Deprecated.
      Sends a POST request to REST API with oauth authentication, content length of the request and request body
      Parameters:
      requestUrl - pass the request url
      token - pass the personal access token
      body - pass the request body to post the request
      Returns:
      response string from the API if any
      Throws:
      AzDException - throws user friendly error message with error code from API
    • patch

      @Deprecated public static String patch(String requestUrl, String token, Map body) throws AzDException
      Deprecated.
      Sends a PATCH request to REST API with basic authentication and request body
      Parameters:
      requestUrl - pass the request url
      token - pass the personal access token
      body - pass the request body to update the request
      Returns:
      response string from the API if any
      Throws:
      AzDException - throws user friendly error message with error code from API
    • patch

      @Deprecated public static String patch(String requestUrl, String token, String body, String contentType) throws AzDException
      Deprecated.
      Sends a PATCH request to REST API with basic authentication and request body
      Parameters:
      requestUrl - pass the request url
      token - pass the personal access token
      body - pass the request body to update the request
      contentType - pass the content type
      Returns:
      response string from the API if any
      Throws:
      AzDException - throws user friendly error message with error code from API
    • patch

      @Deprecated public static String patch(String requestUrl, String token, Map body, String contentType) throws AzDException
      Deprecated.
      Sends a PATCH request to REST API with basic authentication and request body
      Parameters:
      requestUrl - pass the request url
      token - pass the personal access token
      body - pass the request body to update the request
      contentType - pass the content type for the request
      Returns:
      response string from the API if any
      Throws:
      AzDException - throws user friendly error message with error code from API
    • patch

      @Deprecated public static String patch(String requestUrl, String token, List<Object> body) throws AzDException
      Deprecated.
      Sends a PATCH request to REST API with basic authentication and request body
      Parameters:
      requestUrl - pass the request url
      token - pass the personal access token
      body - pass the request body to update the request
      Returns:
      response string from the API if any
      Throws:
      AzDException - throws user friendly error message with error code from API
    • patch

      @Deprecated public static String patch(String requestUrl, String token, List<Object> body, String contentType) throws AzDException
      Deprecated.
      Sends a PATCH request to REST API with basic authentication and request body
      Parameters:
      requestUrl - pass the request url
      token - pass the personal access token
      body - pass the request body to update the request
      contentType - pass the content type for the request
      Returns:
      response string from the API if any
      Throws:
      AzDException - throws user friendly error message with error code from API
    • put

      @Deprecated public static String put(String requestUrl, String token, Map body) throws AzDException
      Deprecated.
      Sends a PUT request to REST API with basic authentication and request body
      Parameters:
      requestUrl - pass the request url
      token - pass the personal access token
      body - pass the request body to update the request
      Returns:
      response string from the API if any
      Throws:
      AzDException - throws user friendly error message with error code from API
    • put

      @Deprecated public static String put(String requestUrl, String token, String body, String contentType) throws AzDException
      Deprecated.
      Sends a PUT request to REST API with basic authentication and request body
      Parameters:
      requestUrl - pass the request url
      token - pass the personal access token
      body - pass the request body to update the request
      Returns:
      response string from the API if any
      Throws:
      AzDException - throws user friendly error message with error code from API
    • delete

      @Deprecated public static String delete(String requestUrl, String token)
      Deprecated.
      Sends a DELETE request to REST API with basic authentication
      Parameters:
      requestUrl - pass the request url
      token - pass the personal access token
      Returns:
      response string from the API if any