com.univocity.api.net
Interface HttpResponseReader


public interface HttpResponseReader

A custom HttpResponse reader which provides better control over how to handle the response body of a HttpResponse object produced by a UrlReaderProvider.

Author:
uniVocity Software Pty Ltd - dev@univocity.com

Method Summary
 void processResponse(HttpResponse response, InputStream responseBody, Charset encoding)
          Processes a HttpResponse obtained through a HttpRequest invocation via a UrlReaderProvider.
 

Method Detail

processResponse

void processResponse(HttpResponse response,
                     InputStream responseBody,
                     Charset encoding)
                     throws Exception
Processes a HttpResponse obtained through a HttpRequest invocation via a UrlReaderProvider.

Parameters:
response - the HTTP response object
responseBody - the body of thr HTTP response
encoding - the character set from the Content-Type header, or if explicitly provided in the HTTP request, the result of HttpRequest.getCharsetName(). If no known character could be obtained, the default system Charset will be provided.
Throws:
Exception - in case anything goes wrong processing the response.


Copyright © 2018 uniVocity Software Pty Ltd. All rights reserved.