public interface HttpRequestDispatcher
HttpRequest
to the API servers and returns a stream
containing the response.
Implementations of this interface may choose to handle compressed responses
by adding an Accept-Encoding header to the request sent to the server, and by
ensuring that the InputStream returned by dispatch(HttpRequest)
has
been inflated. This is all done automatically by the default implementation
of HttpRequestDispatcher
that comes with this client library.
Thread safety: any general-purpose implementation of this interface must be safe for use by multiple concurrent threads. However, thread safety is not necessary if you're making your own implementation and can be sure that any code that uses it (including any code that uses a RequestProcessor
that uses it) will only be called from a single thread.
Modifier and Type | Method and Description |
---|---|
HttpResponseStream |
dispatch(HttpRequest request)
Calling code is responsible for closing the stream that this returns.
|
HttpResponseStream dispatch(HttpRequest request) throws TransportException
TransportException
See www.degreedays.net/api/ for more about the Degree Days.net API.
You can sign up for a Degree Days.net API account and read the integration guide that is useful and applicable whether you are using Java or not.