Hong, Your best bet is probably to use the version of WebResponse from HttpUnit, which (if I recall correctly) has methods like:
public abstract java.lang.String getHeaderField(java.lang.String fieldName)Returns the value for the specified header field. If no such field is defined, will return null. If more than one header is defined for the specified name, returns only the first found. public abstract java.lang.String[] getHeaderFields(java.lang.String fieldName) Returns the values for the specified header field. If no such field is defined, will return an empty array. etc. Does this answer your question? For more info on httpunit integration, see: http://jakarta.apache.org/cactus/howto_httpunit.html Cheers, Nick -----Original Message----- From: Yu Hong [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 30, 2002 6:38 PM To: [EMAIL PROTECTED] Subject: Response content issue! Hi, Guys: Now, I try to get the whole response info after the test case be handled, I know the class WebResponse can help me a lot, but actually the methods getInputStream, getText, etc can only let me get the response's content info, so how can I get the all response's header info? through the HttpURLconnection which I can get from the method getConnection? But actually even in HttpURLConnection, there was not a method can let you get the whole stuff, right? BTW, I found for WebResponse, if I use getInputStream to get the info, then I will get an empty string when I try to use getText to get the response content again, interesting:-) So, anyone have run into the same problem? Any idea is appreciated, thank you very much!!! Hong -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
