org.apache.http.client.methods.CloseableHttpResponse.getProtocolVersion()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(168)

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

CloseableHttpResponse.getProtocolVersion介绍

暂无

代码示例

代码示例来源:origin: foxinmy/weixin4j

@Override
public HttpVersion getProtocol() {
  if (protocol == null) {
    ProtocolVersion version = httpResponse.getProtocolVersion();
    Header connection = httpResponse.getFirstHeader("Connection");
    protocol = new HttpVersion(version.getProtocol(),
        version.getMajor(), version.getMinor(), connection != null
            && KEEP_ALIVE.equalsIgnoreCase(connection
                .getValue()));
  }
  return protocol;
}

代码示例来源:origin: 3zamn/kingMicro

/**
 * 获取协议版本信息
 * 
 * @return
 */
public ProtocolVersion getProtocolVersion(){
  return response.getProtocolVersion();
}

代码示例来源:origin: com.googlecode.openbox/http

public ProtocolVersion getProtocolVersion() {
  return httpResponse.getProtocolVersion();
}

代码示例来源:origin: org.apache.sling/org.apache.sling.testing.clients

@Override
public ProtocolVersion getProtocolVersion() {
  return httpResponse.getProtocolVersion();
}

代码示例来源:origin: com.agapsys/simple-http-client

/**
 * Return the version of the protocol.
 * @return the version of the protocol.
 */
public String getProtocolVersion() {
  ProtocolVersion pv = wrappedResponse.getProtocolVersion();
  return String.format("%s.%s", pv.getMajor(), pv.getMinor());
}

代码示例来源:origin: com.agapsys.libs/simple-http-client

/**
 * Return the version of the protocol.
 * @return the version of the protocol.
 */
public String getProtocolVersion() {
  ProtocolVersion pv = wrappedResponse.getProtocolVersion();
  return String.format("%s.%s", pv.getMajor(), pv.getMinor());
}

代码示例来源:origin: com.foxinmy/weixin4j-base

@Override
public HttpVersion getProtocol() {
  if (protocol == null) {
    ProtocolVersion version = httpResponse.getProtocolVersion();
    Header connection = httpResponse.getFirstHeader("Connection");
    protocol = new HttpVersion(version.getProtocol(),
        version.getMajor(), version.getMinor(), connection != null
            && KEEP_ALIVE.equalsIgnoreCase(connection
                .getValue()));
  }
  return protocol;
}

代码示例来源:origin: org.eclipse.dirigible/dirigible-api-facade-http

httpClientResponse.setStatusCode(response.getStatusLine().getStatusCode());
httpClientResponse.setStatusMessage(response.getStatusLine().getReasonPhrase());
httpClientResponse.setProtocol(response.getProtocolVersion().getProtocol());
httpClientResponse.setProtocol(response.getProtocolVersion().getProtocol());
HttpEntity entity = response.getEntity();
if (entity.getContent() != null) {

代码示例来源:origin: org.eclipse.dirigible/dirigible-api-http

httpClientResponse.setStatusCode(response.getStatusLine().getStatusCode());
httpClientResponse.setStatusMessage(response.getStatusLine().getReasonPhrase());
httpClientResponse.setProtocol(response.getProtocolVersion().getProtocol());
httpClientResponse.setProtocol(response.getProtocolVersion().getProtocol());
HttpEntity entity = response.getEntity();
if (entity.getContent() != null) {

相关文章