public class LoggingHTTPClient extends DelegateHTTPClient
delegate| Constructor and Description | 
|---|
| LoggingHTTPClient(HTTPClient delegate) | 
| LoggingHTTPClient(HTTPClient delegate,
                 String charsetName) | 
| Modifier and Type | Method and Description | 
|---|---|
| static void | copy(InputStream input,
    OutputStream output) | 
| HTTPResponse | get(URL url)Executes an HTTP GET request against the provided URL and returns the server response. | 
| HTTPResponse | post(URL url,
    InputStream postContent,
    String postContentType)Executes an HTTP POST request against the provided URL, sending the contents of  postContentas the POST method body and setting the Content-Type request header topostContentTypeif given, and returns the server response. | 
getConnectTimeout, getPassword, getReadTimeout, getUser, isTryGzip, setConnectTimeout, setPassword, setReadTimeout, setTryGzip, setUserpublic LoggingHTTPClient(HTTPClient delegate)
public LoggingHTTPClient(HTTPClient delegate, String charsetName)
public HTTPResponse post(URL url, InputStream postContent, String postContentType) throws IOException
HTTPClientpostContent as the POST method body and setting the Content-Type request header to postContentType if given, and returns the server response.
 If an HTTP authentication user and password is
 set, the appropriate authentication HTTP header will be sent with the request.
 
If a connection timeout is set, the http connection will be
 set to respect that timeout.
 
If a read timeout is set, the http connection will be set to
 respect it.
post in interface HTTPClientpost in class DelegateHTTPClienturl - the URL against which to execute the POST requestpostContent - an input stream with the contents of the POST bodypostContentType - the MIME type of the contents sent as the request POST body, can be
     nullHTTPResponse encapsulating the response to the HTTP POST requestIOExceptionpublic HTTPResponse get(URL url) throws IOException
HTTPClientIf an HTTP authentication user and password is
 set, the appropriate authentication HTTP header will be sent with the request.
 
If a connection timeout is set, the http connection will be
 set to respect that timeout.
 
If a read timeout is set, the http connection will be set to
 respect it.
get in interface HTTPClientget in class DelegateHTTPClienturl - the URL to retrieveHTTPResponse encapsulating the response to the HTTP GET requestIOExceptionpublic static void copy(InputStream input, OutputStream output) throws IOException
IOExceptionCopyright © 1996–2019 Geotools. All rights reserved.