|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cactus.WebResponse
Default web response implementation that provides a minimal
API for asserting returned output stream from the server side. For more
complex assertions, use an com.meterware.httpunit.WebResponse
instead as parameter of your endXXX()
methods.
Constructor Summary | |
WebResponse(WebRequest theRequest,
java.net.HttpURLConnection theConnection)
|
Method Summary | |
java.net.HttpURLConnection |
getConnection()
|
Cookie |
getCookie(java.lang.String theName)
Return the first cookie found that has the specified name or null if not found. |
Cookie |
getCookieIgnoreCase(java.lang.String theName)
Return the first cookie found that has the specified name or null if not found. |
Cookie[] |
getCookies()
|
java.io.InputStream |
getInputStream()
|
int |
getStatusCode()
Returns the status code returned by the server. |
java.lang.String |
getText()
|
java.lang.String[] |
getTextAsArray()
|
WebRequest |
getWebRequest()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WebResponse(WebRequest theRequest, java.net.HttpURLConnection theConnection)
theRequest
- the request data that were used to open the
connection to the server.theConnection
- the original HttpURLConnection
used
to call the URLMethod Detail |
public java.net.HttpURLConnection getConnection()
HttpURLConnection
used to call the
URLpublic WebRequest getWebRequest()
public java.lang.String getText()
public java.lang.String[] getTextAsArray()
public java.io.InputStream getInputStream()
public Cookie getCookie(java.lang.String theName)
theName
- the cookie name to find
public Cookie getCookieIgnoreCase(java.lang.String theName)
theName
- the cookie name to find (case-insensitive)
public Cookie[] getCookies()
public int getStatusCode()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |