public class XmlHttpRequest
extends java.lang.Object
Constructor and Description |
---|
XmlHttpRequest(java.net.URI uri) |
Modifier and Type | Method and Description |
---|---|
void |
addCredentials(UserCredentials credentials) |
static void |
dumpResponseHeaders(java.net.HttpURLConnection httpReq) |
void |
executeDeleteRequest() |
org.w3c.dom.Document |
executeGetRequest()
Executes a GET request on the given URL.
|
org.w3c.dom.Document |
executePostRequest(org.w3c.dom.Document doc) |
org.w3c.dom.Document |
executePutRequest(org.w3c.dom.Document doc) |
java.net.HttpURLConnection |
getConnection() |
int |
getCurrentRetries()
Return the number of retries the Request needed until it received an answer
|
long |
getExecutionTime() |
int |
getLastStatus() |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getResponseHeaderFields() |
void |
setRequestProperty(java.lang.String property,
java.lang.String value) |
public int getLastStatus()
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getResponseHeaderFields()
public long getExecutionTime()
public void setRequestProperty(java.lang.String property, java.lang.String value)
public void addCredentials(UserCredentials credentials) throws InvalidUserCredentialsException
InvalidUserCredentialsException
public java.net.HttpURLConnection getConnection() throws java.net.MalformedURLException, java.net.ProtocolException, java.io.IOException
java.net.MalformedURLException
java.net.ProtocolException
java.io.IOException
public org.w3c.dom.Document executeGetRequest() throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, XMLHttpRequestException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
XMLHttpRequestException
public org.w3c.dom.Document executePostRequest(org.w3c.dom.Document doc) throws java.net.MalformedURLException, java.io.IOException, XMLHttpRequestException
java.net.MalformedURLException
java.io.IOException
XMLHttpRequestException
public org.w3c.dom.Document executePutRequest(org.w3c.dom.Document doc) throws java.net.MalformedURLException, java.io.IOException, XMLHttpRequestException
java.net.MalformedURLException
java.io.IOException
XMLHttpRequestException
public void executeDeleteRequest() throws java.net.MalformedURLException, java.io.IOException
java.net.MalformedURLException
java.io.IOException
public int getCurrentRetries()
public static void dumpResponseHeaders(java.net.HttpURLConnection httpReq)