Just as outlined by #23547, the Key Vault JCA library is not up to par with other similar data plane libraries in our Azure SDK for Java. As part of the effort to align the library with the rest, we also need to add QoL changes to the HttpUtil class such as:
- Avoid creating a new
HttpClient every time an HTTP request needs to be made and instead use a longer-lived instance wherever possible.
- Stop returning
null in methods such as get() or post() when there's an error in sending a request/ receiving a response and instead bubble up a proper exception.
- Add logic to retry on transient errors, much like what is done in Azure Core's
RetryPolicy.
Just as outlined by #23547, the Key Vault JCA library is not up to par with other similar data plane libraries in our Azure SDK for Java. As part of the effort to align the library with the rest, we also need to add QoL changes to the
HttpUtilclass such as:HttpClientevery time an HTTP request needs to be made and instead use a longer-lived instance wherever possible.nullin methods such asget()orpost()when there's an error in sending a request/ receiving a response and instead bubble up a proper exception.RetryPolicy.