com.meterware.httpunit.WebResponse.getRefreshRequest()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中com.meterware.httpunit.WebResponse.getRefreshRequest()方法的一些代码示例,展示了WebResponse.getRefreshRequest()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebResponse.getRefreshRequest()方法的具体详情如下:
包路径:com.meterware.httpunit.WebResponse
类名称:WebResponse
方法名:getRefreshRequest

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;
  }
}

相关文章

微信公众号

最新文章

更多

WebResponse类方法