|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.service.httputil.HttpUtils
public class HttpUtils
Common http utils querying http locations, handling redirects, self-signed certificates, host verify on certificates, password protection and storing and reusing credentials for password protected sites.
| Nested Class Summary | |
|---|---|
static class |
HttpUtils.HTTPResponseResult
Utility class wraps the http requests result and some utility methods for retrieving info and content for the result. |
| Constructor Summary | |
|---|---|
HttpUtils()
|
|
| Method Summary | |
|---|---|
static HttpUtils.HTTPResponseResult |
openURLConnection(String address)
Opens a connection to the address. |
static HttpUtils.HTTPResponseResult |
openURLConnection(String address,
String[] headerParamNames,
String[] headerParamValues)
Opens a connection to the address. |
static HttpUtils.HTTPResponseResult |
openURLConnection(String address,
String usernamePropertyName,
String passwordPropertyName,
String[] headerParamNames,
String[] headerParamValues)
Opens a connection to the address. |
static HttpUtils.HTTPResponseResult |
postFile(String address,
String fileParamName,
File file)
Posts a file to the address. |
static HttpUtils.HTTPResponseResult |
postFile(String address,
String fileParamName,
File file,
String usernamePropertyName,
String passwordPropertyName)
Posts a file to the address. |
static HttpUtils.HTTPResponseResult |
postForm(String address,
String usernamePropertyName,
String passwordPropertyName,
String[] formParamNames,
String[] formParamValues,
int usernameParamIx,
int passwordParamIx)
Posting form to address. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HttpUtils()
| Method Detail |
|---|
public static HttpUtils.HTTPResponseResult openURLConnection(String address)
address - the address to contact.
public static HttpUtils.HTTPResponseResult openURLConnection(String address,
String[] headerParamNames,
String[] headerParamValues)
address - the address to contact.headerParamNames - additional header name to includeheaderParamValues - corresponding header value to include
public static HttpUtils.HTTPResponseResult openURLConnection(String address,
String usernamePropertyName,
String passwordPropertyName,
String[] headerParamNames,
String[] headerParamValues)
address - the address to contact.usernamePropertyName - the property to use to retrieve/store
username value if protected site is hit, for username
ConfigurationService service is used.passwordPropertyName - the property to use to retrieve/store
password value if protected site is hit, for password
CredentialsStorageService service is used.headerParamNames - additional header name to includeheaderParamValues - corresponding header value to include
public static HttpUtils.HTTPResponseResult postFile(String address,
String fileParamName,
File file)
address - the address to post the form to.fileParamName - the name of the param for the file.file - the file we will send.
public static HttpUtils.HTTPResponseResult postFile(String address,
String fileParamName,
File file,
String usernamePropertyName,
String passwordPropertyName)
address - the address to post the form to.fileParamName - the name of the param for the file.file - the file we will send.usernamePropertyName - the property to use to retrieve/store
username value if protected site is hit, for username
ConfigurationService service is used.passwordPropertyName - the property to use to retrieve/store
password value if protected site is hit, for password
CredentialsStorageService service is used.
public static HttpUtils.HTTPResponseResult postForm(String address,
String usernamePropertyName,
String passwordPropertyName,
String[] formParamNames,
String[] formParamValues,
int usernameParamIx,
int passwordParamIx)
address - HTTP address.usernamePropertyName - the property to use to retrieve/store
username value if protected site is hit, for username
ConfigurationService service is used.passwordPropertyName - the property to use to retrieve/store
password value if protected site is hit, for password
CredentialsStorageService service is used.formParamNames - the parameter names to include in post.formParamValues - the corresponding parameter values to use.usernameParamIx - the index of the username parameter in the
formParamNames and formParamValues
if any, otherwise -1.passwordParamIx - the index of the password parameter in the
formParamNames and formParamValues
if any, otherwise -1.
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||