org.geotools.data.ows
Class LoggingHTTPClient
Object
DelegateHTTPClient
LoggingHTTPClient
- All Implemented Interfaces:
- HTTPClient
public class LoggingHTTPClient
- extends DelegateHTTPClient
Method Summary |
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
postContent as the POST method body and setting the Content-Type request header to
postContentType if given, and returns the server response. |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LoggingHTTPClient
public LoggingHTTPClient(HTTPClient delegate)
LoggingHTTPClient
public LoggingHTTPClient(HTTPClient delegate,
String charsetName)
post
public HTTPResponse post(URL url,
InputStream postContent,
String postContentType)
throws IOException
- Description copied from interface:
HTTPClient
- Executes an HTTP POST request against the provided URL, sending the contents of
postContent
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.
- Specified by:
post
in interface HTTPClient
- Overrides:
post
in class DelegateHTTPClient
- Parameters:
url
- 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 null
- Returns:
- the
HTTPResponse
encapsulating the response to the HTTP POST request
- Throws:
IOException
get
public HTTPResponse get(URL url)
throws IOException
- Description copied from interface:
HTTPClient
- Executes an HTTP GET request against the provided URL 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.
- Specified by:
get
in interface HTTPClient
- Overrides:
get
in class DelegateHTTPClient
- Parameters:
url
- the URL to retrieve
- Returns:
- an
HTTPResponse
encapsulating the response to the HTTP GET request
- Throws:
IOException
copy
public static void copy(InputStream input,
OutputStream output)
throws IOException
- Throws:
IOException
Copyright © 1996-2014 Geotools. All Rights Reserved.