Method from org.apache.cactus.WebRequest Detail: |
public void addCookie(Cookie theCookie)
Adds a cookie to the request.
Note that the domain must match either the redirector host
(specified in cactus.properties ) or the host set
using setURL() . |
public void addCookie(String theName,
String theValue)
|
public void addCookie(String theDomain,
String theName,
String theValue)
Adds a cookie to the request. The cookie will be created with the
domain passed as parameter (i.e. the cookie will get sent only to
requests to that domain).
Note that the domain must match either the redirector host
(specified in cactus.properties ) or the host set
using setURL() . |
public void addHeader(String theName,
String theValue)
Adds a header to the request. Supports adding several values for the
same header name. |
public void addParameter(String theName,
String theValue)
Adds a parameter to the request. The parameter is added to the query
string of the URL. |
public void addParameter(String theName,
String theValue,
String theMethod)
Adds a parameter to the request. It is possible to add several times the
the same parameter name, but with different value (the same as for the
HttpServletRequest ). |
public Authentication getAuthentication()
|
public boolean getAutomaticSession()
|
public String getContentType()
|
public Vector getCookies()
|
public String getHeader(String theName)
Returns the first value corresponding to this header's name. |
public Enumeration getHeaderNames()
|
public String[] getHeaderValues(String theName)
Returns all the values associated with this header's name. |
public String getParameterGet(String theName)
Returns the first value corresponding to this parameter's name (provided
this parameter is passed in the URL). |
public Enumeration getParameterNamesGet()
|
public Enumeration getParameterNamesPost()
|
public String getParameterPost(String theName)
Returns the first value corresponding to this parameter's name (provided
this parameter is passed in the request body - POST). |
public String[] getParameterValuesGet(String theName)
Returns all the values corresponding to this parameter's name (provided
this parameter is passed in the URL). |
public String[] getParameterValuesPost(String theName)
Returns all the values corresponding to this parameter's name (provided
this parameter is passed in the request body - POST). |
public String getRedirectorName()
|
public HttpSessionCookie getSessionCookie()
Gets an HTTP session id by calling the server side and retrieving
the jsessionid cookie in the HTTP response. This is achieved by
calling the Cactus redirector used by the current test case. |
public ServletURL getURL()
|
public InputStream getUserData()
|
public void setAuthentication(Authentication theAuthentication)
Sets the authentication object that will configure the http request. |
public void setAutomaticSession(boolean isAutomaticSession)
|
public void setContentType(String theContentType)
Sets the content type that will be set in the http request. |
public void setRedirectorName(String theRedirectorName)
Override the redirector Name defined in cactus.properties .
This is useful to define a per test case Name (for example, if some
test case need to have authentication turned on and not other tests,
etc). |
public void setURL(String theServerName,
String theContextPath,
String theServletPath,
String thePathInfo,
String theQueryString)
|
public void setUserData(InputStream theDataStream)
Allow the user to send arbitrary data in the request body. |