本文整理了Java中jodd.http.HttpResponse.getHttpRequest()
方法的一些代码示例,展示了HttpResponse.getHttpRequest()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpResponse.getHttpRequest()
方法的具体详情如下:
包路径:jodd.http.HttpResponse
类名称:HttpResponse
方法名:getHttpRequest
[英]Returns jodd.http.HttpRequest that created this response.
[中]乔德回来了。http。创建此响应的HttpRequest。
代码示例来源:origin: oblac/jodd
/**
* Parses 'location' header to return the next location or returns {@code null} if location not specified.
* Specification (<a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30">rfc2616</a>)
* says that only absolute path must be provided, however, this does not
* happens in the real world. There a <a href="https://tools.ietf.org/html/rfc7231#section-7.1.2">proposal</a>
* that allows server name etc to be omitted.
*/
public String location() {
String location = header("location");
if (location == null) {
return null;
}
if (location.startsWith(StringPool.SLASH)) {
location = getHttpRequest().hostUrl() + location;
}
return location;
}
代码示例来源:origin: oblac/jodd
boolean keepAlive = httpResponse.isConnectionPersistent();
if (keepAlive) {
HttpConnection previousConnection = httpResponse.getHttpRequest().httpConnection;
this.httpConnectionProvider = httpResponse.getHttpRequest().connectionProvider();
open(httpResponse.getHttpRequest().connectionProvider());
代码示例来源:origin: org.jodd/jodd-http
/**
* Parses 'location' header to return the next location or returns {@code null} if location not specified.
* Specification (<a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30">rfc2616</a>)
* says that only absolute path must be provided, however, this does not
* happens in the real world. There a <a href="https://tools.ietf.org/html/rfc7231#section-7.1.2">proposal</a>
* that allows server name etc to be omitted.
*/
public String location() {
String location = header("location");
if (location == null) {
return null;
}
if (location.startsWith(StringPool.SLASH)) {
location = getHttpRequest().hostUrl() + location;
}
return location;
}
代码示例来源:origin: org.jodd/jodd-http
boolean keepAlive = httpResponse.isConnectionPersistent();
if (keepAlive) {
HttpConnection previousConnection = httpResponse.getHttpRequest().httpConnection;
this.httpConnectionProvider = httpResponse.getHttpRequest().connectionProvider();
open(httpResponse.getHttpRequest().connectionProvider());
内容来源于网络,如有侵权,请联系作者删除!