Interface SdkAsyncHttpResponseHandler


  • public interface SdkAsyncHttpResponseHandler
    Handles asynchronous HTTP responses.
    • Method Detail

      • onHeaders

        void onHeaders​(SdkHttpResponse headers)
        Called when the headers have been received.
        Parameters:
        headers - The headers.
      • onStream

        void onStream​(org.reactivestreams.Publisher<ByteBuffer> stream)
        Called when the streaming body is ready.

        This method is always called. If the response does not have a body, then the publisher will complete the subscription without signalling any elements.

        Parameters:
        stream - The streaming body.
      • onError

        void onError​(Throwable error)
        Called when there is an error making the request or receiving the response. If the error is encountered while streaming the body, then the error is also delivered to the Subscriber.
        Parameters:
        error - The error.