Package org.azd.utils
Class BaseClient
java.lang.Object
org.azd.utils.BaseClient
- Direct Known Subclasses:
Client
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.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringDeprecated.static StringDeprecated.static StringDeprecated.static StringDeprecated.static StringDeprecated.static StringDeprecated.static StringDeprecated.static StringDeprecated.static StringDeprecated.static StringDeprecated.static StringDeprecated.static StringDeprecated.static StringDeprecated.static StringDeprecated.static StringDeprecated.
-
Constructor Details
-
BaseClient
public BaseClient()Deprecated.
-
-
Method Details
-
get
Deprecated.Sends a GET request to REST API- Parameters:
requestUrl- pass the request url- Returns:
- response string from the API
-
get
Deprecated.Sends a GET request to REST API with basic authentication- Parameters:
requestUrl- pass the request urltoken- pass the personal access token- Returns:
- response string from the API
-
get
Deprecated.Sends a GET request to REST API with basic authentication- Parameters:
requestUrl- pass the request urltoken- pass the personal access tokencontentType- 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 urltoken- pass the personal access tokenbody- 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.Sends a POST request to REST API with oauth authentication, content length of the request and request body- Parameters:
requestUrl- pass the request urlbody- 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 urltoken- pass the personal access tokenbody- pass the request body to post the requestcontentType- 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 urltoken- pass the personal access tokenbody- 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 urltoken- pass the personal access tokenbody- 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 urltoken- pass the personal access tokenbody- pass the request body to update the requestcontentType- 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 urltoken- pass the personal access tokenbody- pass the request body to update the requestcontentType- 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 urltoken- pass the personal access tokenbody- 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 urltoken- pass the personal access tokenbody- pass the request body to update the requestcontentType- 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.Sends a PUT request to REST API with basic authentication and request body- Parameters:
requestUrl- pass the request urltoken- pass the personal access tokenbody- 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 urltoken- pass the personal access tokenbody- 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.Sends a DELETE request to REST API with basic authentication- Parameters:
requestUrl- pass the request urltoken- pass the personal access token- Returns:
- response string from the API if any
-