Package edu.byu.hbll.box.client
Class HttpBoxClient
java.lang.Object
edu.byu.hbll.box.client.AbstractHttpBoxClient
edu.byu.hbll.box.client.HttpBoxClient
- All Implemented Interfaces:
BoxClient
A client for communicating with Box through it's web api.
- Author:
- Charles Draper
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.byu.hbll.box.client.AbstractHttpBoxClient
AbstractHttpBoxClient.QueryResponse
-
Constructor Summary
ConstructorDescriptionHttpBoxClient
(URI uri) Creates a newHttpBoxClient
with the given base uri.HttpBoxClient
(URI uri, HttpClient client) Creates a newHttpBoxClient
with the given base uri and client. -
Method Summary
Modifier and TypeMethodDescriptionprotected InputStream
Sends the request to the Box server and returns the response as an input stream.Methods inherited from class edu.byu.hbll.box.client.AbstractHttpBoxClient
collect, find, getUri
-
Constructor Details
-
HttpBoxClient
Creates a newHttpBoxClient
with the given base uri. A newHttpClient
is used with default settings plus it always follows redirects.- Parameters:
uri
- the base uri of the box source (eg, http://localhost:8080/app/box)
-
HttpBoxClient
Creates a newHttpBoxClient
with the given base uri and client.- Parameters:
uri
- the base uri of the box source (eg, http://localhost:8080/app/box)client
- http client to use
-
-
Method Details
-
send
Description copied from class:AbstractHttpBoxClient
Sends the request to the Box server and returns the response as an input stream. This can be overridden by subclasses that require different HTTP clients. The input stream will be closed here.- Specified by:
send
in classAbstractHttpBoxClient
- Parameters:
uri
- the full uri to send to box for the query- Returns:
- the response body as an
InputStream
-