本文整理了Java中com.meterware.httpunit.WebResponse.loadResponseText()
方法的一些代码示例,展示了WebResponse.loadResponseText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebResponse.loadResponseText()
方法的具体详情如下:
包路径:com.meterware.httpunit.WebResponse
类名称:WebResponse
方法名:loadResponseText
暂无
代码示例来源:origin: org.kohsuke.httpunit/httpunit
/**
* Returns the text of the response (excluding headers) as a string. Use this method in preference to 'toString'
* which may be used to represent internal state of this object.
**/
public String getText() throws IOException {
if (_responseText == null) loadResponseText();
return _responseText;
}
代码示例来源:origin: httpunit/httpunit
/**
* Returns the text of the response (excluding headers) as a string. Use this method in preference to 'toString'
* which may be used to represent internal state of this object.
**/
public String getText() throws IOException {
if (_responseText == null) loadResponseText();
return _responseText;
}
代码示例来源:origin: javanettasks/httpunit
/**
* Returns the text of the response (excluding headers) as a string. Use this method in preference to 'toString'
* which may be used to represent internal state of this object.
**/
public String getText() throws IOException {
if (_responseText == null) loadResponseText();
return _responseText;
}
代码示例来源:origin: org.kohsuke.httpunit/httpunit
/**
* Constructs a response object from a servlet response.
* @param frame the target frame on which the response will be displayed
* @param url the url from which the response was received
* @param response the response populated by the servlet
**/
ServletUnitWebResponse( ServletUnitClient client, FrameSelector frame, URL url, HttpServletResponse response, boolean throwExceptionOnError ) throws IOException {
super( client, frame, url );
_response = (ServletUnitHttpResponse) response;
/** make sure that any IO exception for HTML received page happens here, not later. **/
if (getResponseCode() < HttpURLConnection.HTTP_BAD_REQUEST || !throwExceptionOnError) {
defineRawInputStream( new ByteArrayInputStream( _response.getContents() ) );
if (getContentType().startsWith( "text" )) loadResponseText();
}
}
代码示例来源:origin: org.kohsuke.httpunit/httpunit
/**
* Constructs a response object from an input stream.
* @param frame the target window or frame to which the request should be directed
* @param url the url from which the response was received
* @param connection the URL connection from which the response can be read
**/
HttpWebResponse( WebConversation client, FrameSelector frame, URL url, URLConnection connection, boolean throwExceptionOnError ) throws IOException {
super( client, frame, url );
if (HttpUnitOptions.isLoggingHttpHeaders()) System.out.println( "\nReceived from " + url );
readHeaders( connection );
/** make sure that any IO exception for HTML received page happens here, not later. **/
if (_responseCode < HttpURLConnection.HTTP_BAD_REQUEST || !throwExceptionOnError) {
defineRawInputStream( new BufferedInputStream( getInputStream( connection ) ) );
if (getContentType().startsWith( "text" )) loadResponseText();
}
}
内容来源于网络,如有侵权,请联系作者删除!