org.simpleframework.http.Request.isSecure()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(253)

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

Request.isSecure介绍

[英]This is used to determine if the request has been transferred over a secure connection. If the protocol is HTTPS and the content is delivered over SSL then the request is considered to be secure. Also the associated response will be secure.
[中]这用于确定请求是否已通过安全连接传输。如果协议是HTTPS,并且内容通过SSL传递,则该请求被认为是安全的。此外,相关的响应将是安全的。

代码示例

代码示例来源:origin: jersey/jersey

@Override
public boolean isSecure() {
  return request.isSecure();
}

代码示例来源:origin: jersey/jersey

private URI getBaseUri(final Request request) {
  try {
    final String hostHeader = request.getValue("Host");
    if (hostHeader != null) {
      final String scheme = request.isSecure() ? "https" : "http";
      return new URI(scheme + "://" + hostHeader + "/");
    } else {
      final Address address = request.getAddress();
      return new URI(address.getScheme(), null, address.getDomain(), address.getPort(), "/", null,
          null);
    }
  } catch (final URISyntaxException ex) {
    throw new IllegalArgumentException(ex);
  }
}

代码示例来源:origin: org.simpleframework/simple-http

/**
* This is used to determine if the request has been transferred
* over a secure connection. If the protocol is HTTPS and the 
* content is delivered over SSL then the request is considered
* to be secure. Also the associated response will be secure.
* 
* @return true if the request is transferred securely
*/
public boolean isSecure() {
 return request.isSecure();
}

代码示例来源:origin: org.simpleframework/simple

/**
* This is used to determine if the request has been transferred
* over a secure connection. If the protocol is HTTPS and the 
* content is delivered over SSL then the request is considered
* to be secure. Also the associated response will be secure.
* 
* @return true if the request is transferred securely
*/
public boolean isSecure() {
 return request.isSecure();
}

代码示例来源:origin: CodeStory/fluent-http

@Override
public boolean isSecure() {
 return request.isSecure();
}

代码示例来源:origin: ngallagher/simpleframework

/**
* This is used to determine if the request has been transferred
* over a secure connection. If the protocol is HTTPS and the 
* content is delivered over SSL then the request is considered
* to be secure. Also the associated response will be secure.
* 
* @return true if the request is transferred securely
*/
public boolean isSecure() {
 return request.isSecure();
}

代码示例来源:origin: restx/restx

@Override
protected String getLocalScheme() {
  return request.isSecure() ? "https" : "http";
}

代码示例来源:origin: org.glassfish.jersey.containers/jersey-container-simple-http

@Override
public boolean isSecure() {
  return request.isSecure();
}

代码示例来源:origin: io.restx/restx-server-simple

@Override
protected String getLocalScheme() {
  return request.isSecure() ? "https" : "http";
}

代码示例来源:origin: org.glassfish.jersey.containers/jersey-container-simple-http

private URI getBaseUri(final Request request) {
  try {
    final String hostHeader = request.getValue("Host");
    if (hostHeader != null) {
      final String scheme = request.isSecure() ? "https" : "http";
      return new URI(scheme + "://" + hostHeader + "/");
    } else {
      final Address address = request.getAddress();
      return new URI(address.getScheme(), null, address.getDomain(), address.getPort(), "/", null,
          null);
    }
  } catch (final URISyntaxException ex) {
    throw new IllegalArgumentException(ex);
  }
}

代码示例来源:origin: miltonio/milton2

if (baseRequest.isSecure()) {
  s = "https";
} else {

相关文章