Class HttpResponseWrapper

  • All Implemented Interfaces:
    com.microsoft.aad.msal4j.IHttpResponse, Closeable, AutoCloseable

    public class HttpResponseWrapper
    extends com.azure.core.http.HttpResponse
    implements com.microsoft.aad.msal4j.IHttpResponse
    This class wraps our azure HttpResponse, into both the asynchronous HttpResponse class and the synchronous IHttpResponse interface from the azure core library. This class completes the HttpClientWrapper class, which is responsible for wrapping the http client, this client wraps the response from the client.
    • Constructor Detail

      • HttpResponseWrapper

        protected HttpResponseWrapper​(com.azure.core.http.HttpRequest request,
                                      org.apache.http.HttpResponse response)
      • HttpResponseWrapper

        protected HttpResponseWrapper​(org.apache.http.HttpResponse response)
    • Method Detail

      • getStatusCode

        public int getStatusCode()
        Specified by:
        getStatusCode in class com.azure.core.http.HttpResponse
      • getHeaderValue

        public String getHeaderValue​(String s)
        Specified by:
        getHeaderValue in class com.azure.core.http.HttpResponse
      • getHeaders

        public com.azure.core.http.HttpHeaders getHeaders()
        Specified by:
        getHeaders in class com.azure.core.http.HttpResponse
      • getBody

        public reactor.core.publisher.Flux<ByteBuffer> getBody()
        Specified by:
        getBody in class com.azure.core.http.HttpResponse
      • getBodyAsByteArray

        public reactor.core.publisher.Mono<byte[]> getBodyAsByteArray()
        Specified by:
        getBodyAsByteArray in class com.azure.core.http.HttpResponse
      • getBodyAsString

        public reactor.core.publisher.Mono<String> getBodyAsString()
        Specified by:
        getBodyAsString in class com.azure.core.http.HttpResponse
      • getBodyAsString

        public reactor.core.publisher.Mono<String> getBodyAsString​(Charset charset)
        Specified by:
        getBodyAsString in class com.azure.core.http.HttpResponse
      • statusCode

        public int statusCode()
        Specified by:
        statusCode in interface com.microsoft.aad.msal4j.IHttpResponse
      • headers

        public Map<String,​List<String>> headers()
        Specified by:
        headers in interface com.microsoft.aad.msal4j.IHttpResponse
      • body

        public String body()
        Specified by:
        body in interface com.microsoft.aad.msal4j.IHttpResponse