com.pushtotest.tool.response
Class HTTPResponse

java.lang.Object
  extended by com.pushtotest.tool.response.ResponseWrapper
      extended by com.pushtotest.tool.response.HTTPResponse
All Implemented Interfaces:
Response

public class HTTPResponse
extends ResponseWrapper

This is the Response interface that should be implemented by any protocol specific response version.


Field Summary
protected  java.util.Hashtable cookies
           
 
Fields inherited from class com.pushtotest.tool.response.ResponseWrapper
content, datatime, parameters, parent, responsecode, responseMessage, setuptime, totaltime
 
Constructor Summary
HTTPResponse()
           
 
Method Summary
 java.util.Hashtable getCookies()
          Returns an Hashtable containing the cookies received from the host.
 java.lang.String id()
          Returns an id for this protocol.
 
Methods inherited from class com.pushtotest.tool.response.ResponseWrapper
appendParameter, appendParameters, getContent, getContentSize, getDataTime, getParameterKeys, getParameterValue, getParameterValues, getParentProtocol, getResponseCode, getResponseMessage, getSetupTime, getTotalTime, setContent, setDataTime, setParameter, setParameters, setParentProtocol, setResponseCode, setResponseMessage, setSetupTime, setTotalTime, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cookies

protected java.util.Hashtable cookies
Constructor Detail

HTTPResponse

public HTTPResponse()
Method Detail

id

public java.lang.String id()
Returns an id for this protocol. The id is a string that will be used to uniquily identify the protocol. For example :// would be appropriate (without the "://").

Specified by:
id in interface Response
Specified by:
id in class ResponseWrapper
Returns:
The id for this Protocol.

getCookies

public java.util.Hashtable getCookies()
Returns an Hashtable containing the cookies received from the host. Most Web hosts send back multiple cookies that may look like this: sessionid=483388;userid=fcohen;viewprefs=true From the TestMaker script one can get each of these cookie name/value pairs with this code:
 cookies = response.getCookies()
for i in cookies.keys():
print "Cookie name=", i, " value=", cookies[i]

Returns:
Hashtable containing the cookies received from the host