public static interface Twitter.IHttpClient
URLConnectionHttpClient.
If creating your own version, please provide support for throwing the right subclass of TwitterException - see
URLConnectionHttpClient.processError(java.net.HttpURLConnection) for example code.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canAuthenticate()
Whether this client can authenticate to the server.
|
java.lang.String |
getPage(java.lang.String uri,
java.util.Map<java.lang.String,java.lang.String> vars,
boolean authenticate)
Send an HTTP GET request and return the response body.
|
java.lang.String |
post(java.lang.String uri,
java.util.Map<java.lang.String,java.lang.String> vars,
boolean authenticate)
Send an HTTP POST request and return the response body.
|
boolean canAuthenticate()
java.lang.String getPage(java.lang.String uri,
java.util.Map<java.lang.String,java.lang.String> vars,
boolean authenticate)
throws TwitterException
uri - The uri to fetchvars - get arguments to add to the uriauthenticate - If true, use authentication. The authentication method used depends on the implementation (basic-auth,
OAuth). It is an error to use true if no authentication details have been set.TwitterException - for a variety of reasonsTwitterException.E404 - for resource-does-not-exist errorsjava.lang.String post(java.lang.String uri,
java.util.Map<java.lang.String,java.lang.String> vars,
boolean authenticate)
throws TwitterException
uri - The uri to post to.vars - The form variables to send. These are URL encoded before sending.authenticate - If true, send user authenticationTwitterException - for a variety of reasonsTwitterException.E404 - for resource-does-not-exist errorsCopyright © 2015 gvSIG Association. All Rights Reserved.