Class HttpClientWrapper

  • All Implemented Interfaces:
    com.azure.core.http.HttpClient, com.microsoft.aad.msal4j.IHttpClient

    public class HttpClientWrapper
    extends Object
    implements com.azure.core.http.HttpClient, com.microsoft.aad.msal4j.IHttpClient
    This class wraps both of the azure http client interfaces - IHttpClient and HttpClient to use our apache http client. These interfaces are required by the azure authentication classes - IHttpClient for Managed Identity, and HttpClient for the rest. HttpClient is synchronous, so the implementation is straight-forward. IHttpClient is asynchronous, so we need to be more clever about integrating it with the synchronous apache client.
    • Method Detail

      • send

        public reactor.core.publisher.Mono<com.azure.core.http.HttpResponse> send​(com.azure.core.http.HttpRequest httpRequest)
        Specified by:
        send in interface com.azure.core.http.HttpClient
      • send

        public com.microsoft.aad.msal4j.IHttpResponse send​(com.microsoft.aad.msal4j.HttpRequest httpRequest)
                                                    throws Exception
        Specified by:
        send in interface com.microsoft.aad.msal4j.IHttpClient
        Throws:
        Exception