本文整理了Java中com.meterware.httpunit.WebResponse.getRefreshRequest()
方法的一些代码示例,展示了WebResponse.getRefreshRequest()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebResponse.getRefreshRequest()
方法的具体详情如下:
包路径:com.meterware.httpunit.WebResponse
类名称:WebResponse
方法名:getRefreshRequest
[英]Returns a request to refresh this page, if any. This request will be defined by a tag in the header. If no tag exists, will return null.
[中]
代码示例来源:origin: javanettasks/httpunit
/**
* Updates this web client based on a received response. This includes updating
* cookies and frames.
**/
WebResponse updateWindow( String requestTarget, WebResponse response, RequestContext requestContext ) throws IOException, SAXException {
_client.updateClient( response );
if (getClient().getClientProperties().isAutoRefresh() && response.getRefreshRequest() != null) {
WebRequest request=response.getRefreshRequest();
WebResponse result=getResponse( request );
return result;
} else if (shouldFollowRedirect( response )) {
delay( HttpUnitOptions.getRedirectDelay() );
return getResponse( new RedirectWebRequest( response ) );
} else {
_client.updateFrameContents( this, requestTarget, response, requestContext );
return response;
}
}
代码示例来源:origin: org.kohsuke.httpunit/httpunit
/**
* Updates this web client based on a received response. This includes updating
* cookies and frames.
**/
WebResponse updateWindow( String requestTarget, WebResponse response, RequestContext requestContext ) throws IOException, SAXException {
_client.updateClient( response );
if (getClient().getClientProperties().isAutoRefresh() && response.getRefreshRequest() != null) {
WebRequest request=response.getRefreshRequest();
WebResponse result=getResponse( request );
return result;
} else if (shouldFollowRedirect( response )) {
delay( HttpUnitOptions.getRedirectDelay() );
return getResponse( new RedirectWebRequest( response ) );
} else {
_client.updateFrameContents( this, requestTarget, response, requestContext );
return response;
}
}
代码示例来源:origin: httpunit/httpunit
/**
* Updates this web client based on a received response. This includes updating
* cookies and frames.
**/
WebResponse updateWindow( String requestTarget, WebResponse response, RequestContext requestContext ) throws IOException, SAXException {
_client.updateClient( response );
if (getClient().getClientProperties().isAutoRefresh() && response.getRefreshRequest() != null) {
WebRequest request=response.getRefreshRequest();
WebResponse result=getResponse( request );
return result;
} else if (shouldFollowRedirect( response )) {
delay( HttpUnitOptions.getRedirectDelay() );
return getResponse( new RedirectWebRequest( response ) );
} else {
_client.updateFrameContents( this, requestTarget, response, requestContext );
return response;
}
}
内容来源于网络,如有侵权,请联系作者删除!