[Httpunit-commit] CVS: httpunit/src/com/meterware/httpunit WebConversation.java,1.7,1.8
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2000-09-25 21:31:04
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit In directory slayer.i.sourceforge.net:/tmp/cvs-serv24063/src/com/meterware/httpunit Modified Files: WebConversation.java Log Message: Support methods to check current cookies Index: WebConversation.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebConversation.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- WebConversation.java 2000/09/13 20:42:36 1.7 +++ WebConversation.java 2000/09/25 21:31:01 1.8 @@ -75,6 +75,27 @@ _cookies.put( name, value ); } + + /** + * Returns the name of all the active cookies which will be sent to the server. + **/ + public String[] getCookieNames() { + String[] names = new String[ _cookies.size() ]; + int i = 0; + for (Enumeration e = _cookies.keys(); e.hasMoreElements();) { + names[i++] = (String) e.nextElement(); + } + return names; + } + + + /** + * Returns the value of the specified cookie. + **/ + public String getCookieValue( String name ) { + return (String) _cookies.get( name ); + } + /** * Specifies the user agent identification. Used to trigger browser-specific server behavior. |