public class DefaultClient extends AbstractClient
DELETE_METHOD, GET_METHOD, LIVE_API, POST_METHOD, PUT_METHOD, SANDBOX_API
Constructor and Description |
---|
DefaultClient(String apiBaseUrl,
String apiAccessKey,
String apiAccessSecret) |
Modifier and Type | Method and Description |
---|---|
protected Response |
createResponse(HttpURLConnection connection) |
protected Response |
sendVideoUploadRequest(URL url,
RequestMethod method,
String auth,
InputStream input,
String fileName,
long fileSize)
Sends video with an authentication value to a webservice.
|
protected Response |
sendXmlAttachmentRequest(URL url,
RequestMethod method,
String xml,
InputStream input,
String fileName,
String mimeType)
Sends XML string together with a file to a webservice.
|
protected Response |
sendXmlRequest(URL url,
RequestMethod method,
String xml)
Sends XML string to a webservice.
|
authorize, authorize, authorizeAfterVerification, authorizeAfterVerification, buildOAuthConsumer, buildOAuthProvider, fetchVerification, fetchVerification, getApiBaseUrl, getAuthConsumer, getAuthProvider, getEncodedParameterValue, getEncoding
protected Response createResponse(HttpURLConnection connection) throws IOException
IOException
protected Response sendXmlRequest(URL url, RequestMethod method, String xml) throws IOException, oauth.signpost.exception.OAuthException
AbstractClient
sendXmlRequest
in class AbstractClient
url
- the URL of the websericemethod
- the HTTP method of the outgoing requestxml
- the XML string, that is sent to the webserviceIOException
oauth.signpost.exception.OAuthException
protected Response sendXmlAttachmentRequest(URL url, RequestMethod method, String xml, InputStream input, String fileName, String mimeType) throws IOException, oauth.signpost.exception.OAuthException
AbstractClient
sendXmlAttachmentRequest
in class AbstractClient
url
- the URL of the websericemethod
- the HTTP method of the outgoing requestxml
- the XML string, that is sent to the webserviceinput
- the file content, that is sent to the webservicefileName
- the name of the file, that is sent to the webservicemimeType
- the MIME-type of the file, that is sent to the webserviceIOException
oauth.signpost.exception.OAuthException
protected Response sendVideoUploadRequest(URL url, RequestMethod method, String auth, InputStream input, String fileName, long fileSize) throws IOException, oauth.signpost.exception.OAuthException
AbstractClient
sendVideoUploadRequest
in class AbstractClient
url
- the URL of the websericemethod
- the HTTP method of the outgoing requestauth
- the authentication value, that is sent to the webserviceinput
- the file content, that is sent to the webservicefileName
- the name of the file, that is sent to the webservicefileSize
- the size of the file, that is sent to the webservice (in bytes)IOException
oauth.signpost.exception.OAuthException
Copyright © 2014 OpenEstate. All rights reserved.