本文整理了Java中com.gargoylesoftware.htmlunit.WebClient.printContentIfNecessary()
方法的一些代码示例,展示了WebClient.printContentIfNecessary()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebClient.printContentIfNecessary()
方法的具体详情如下:
包路径:com.gargoylesoftware.htmlunit.WebClient
类名称:WebClient
方法名:printContentIfNecessary
[英]INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Logs the response's content if its status code indicates a request failure and WebClientOptions#isPrintContentOnFailingStatusCode() returns true.
[中]内部API-随时可能更改-使用风险自负。
如果响应的状态代码指示请求失败,则记录响应的内容,WebClientOptions#isPrintContentOnFailingStatusCode()返回true。
代码示例来源:origin: javaee/security-soteria
@Override
public void printContentIfNecessary(WebResponse webResponse) {
int statusCode = webResponse.getStatusCode();
if (getOptions().getPrintContentOnFailingStatusCode() && !(statusCode >= SC_OK && statusCode < SC_MULTIPLE_CHOICES)) {
logger.log(SEVERE, webResponse.getWebRequest().getUrl().toExternalForm());
}
super.printContentIfNecessary(webResponse);
}
};
代码示例来源:origin: org.glassfish.soteria.test/common
@Override
public void printContentIfNecessary(WebResponse webResponse) {
int statusCode = webResponse.getStatusCode();
if (getOptions().getPrintContentOnFailingStatusCode() && !(statusCode >= SC_OK && statusCode < SC_MULTIPLE_CHOICES)) {
logger.log(SEVERE, webResponse.getWebRequest().getUrl().toExternalForm());
}
super.printContentIfNecessary(webResponse);
}
};
代码示例来源:origin: HtmlUnit/htmlunit
client.printContentIfNecessary(response);
client.throwFailingHttpStatusCodeExceptionIfNecessary(response);
代码示例来源:origin: net.sourceforge.htmlunit/htmlunit
client.printContentIfNecessary(response);
client.throwFailingHttpStatusCodeExceptionIfNecessary(response);
代码示例来源:origin: net.disy.htmlunit/htmlunit
client.printContentIfNecessary(response);
client.throwFailingHttpStatusCodeExceptionIfNecessary(response);
代码示例来源:origin: org.jvnet.hudson/htmlunit
final WebResponse response = client.loadWebResponse(request);
uri = response.getRequestSettings().getUrl().toExternalForm();
client.printContentIfNecessary(response);
client.throwFailingHttpStatusCodeExceptionIfNecessary(response);
代码示例来源:origin: org.jenkins-ci/htmlunit
final WebResponse response = client.loadWebResponse(request);
uri = response.getRequestSettings().getUrl().toExternalForm();
client.printContentIfNecessary(response);
client.throwFailingHttpStatusCodeExceptionIfNecessary(response);
代码示例来源:origin: net.disy.htmlunit/htmlunit
final WebResponse response = client.loadWebResponse(request);
uri = response.getRequestSettings().getUrl().toExternalForm();
client.printContentIfNecessary(response);
client.throwFailingHttpStatusCodeExceptionIfNecessary(response);
代码示例来源:origin: org.jvnet.hudson/htmlunit
client.printContentIfNecessary(response);
client.throwFailingHttpStatusCodeExceptionIfNecessary(response);
代码示例来源:origin: org.jenkins-ci/htmlunit
client.printContentIfNecessary(response);
client.throwFailingHttpStatusCodeExceptionIfNecessary(response);
代码示例来源:origin: net.sourceforge.htmlunit/htmlunit
printContentIfNecessary(webResponse);
loadWebResponseInto(webResponse, webWindow);
代码示例来源:origin: HtmlUnit/htmlunit
printContentIfNecessary(webResponse);
loadWebResponseInto(webResponse, webWindow);
代码示例来源:origin: org.jvnet.hudson/htmlunit
printContentIfNecessary(webResponse);
loadWebResponseInto(webResponse, webWindow);
throwFailingHttpStatusCodeExceptionIfNecessary(webResponse);
代码示例来源:origin: org.jenkins-ci/htmlunit
printContentIfNecessary(webResponse);
loadWebResponseInto(webResponse, webWindow);
throwFailingHttpStatusCodeExceptionIfNecessary(webResponse);
代码示例来源:origin: net.disy.htmlunit/htmlunit
printContentIfNecessary(webResponse);
loadWebResponseInto(webResponse, webWindow);
throwFailingHttpStatusCodeExceptionIfNecessary(webResponse);
代码示例来源:origin: HtmlUnit/htmlunit
client.printContentIfNecessary(response);
client.throwFailingHttpStatusCodeExceptionIfNecessary(response);
代码示例来源:origin: net.sourceforge.htmlunit/htmlunit
client.printContentIfNecessary(response);
client.throwFailingHttpStatusCodeExceptionIfNecessary(response);
内容来源于网络,如有侵权,请联系作者删除!