public class WebResponse
extends java.lang.Object
com.meterware.httpunit.WebResponse
instead as parameter of your endXXX()
methods.Constructor and Description |
---|
WebResponse(WebRequest theRequest,
java.net.HttpURLConnection theConnection) |
Modifier and Type | Method and Description |
---|---|
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() |
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 URLpublic 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 findpublic Cookie getCookieIgnoreCase(java.lang.String theName)
theName
- the cookie name to find (case-insensitive)public Cookie[] getCookies()
public int getStatusCode()
Copyright © 2000-2004 Apache Software Foundation. All Rights Reserved.