本文整理了Java中org.restlet.util.Series.getValues()
方法的一些代码示例,展示了Series.getValues()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Series.getValues()
方法的具体详情如下:
包路径:org.restlet.util.Series
类名称:Series
方法名:getValues
[英]Returns the values of the parameters with a given name. If multiple parameters with the same name are found, all values are concatenated and separated by a comma (like for HTTP message headers).
[中]返回具有给定名称的参数值。如果找到具有相同名称的多个参数,则所有值都会连接起来,并用逗号分隔(如HTTP消息头)。
代码示例来源:origin: org.restlet/org.restlet
/**
* Returns the values of the parameters with a given name. If multiple
* parameters with the same name are found, all values are concatenated and
* separated by a comma (like for HTTP message headers).
*
* @param name
* The parameter name (case insensitive).
* @return The values of the parameters with a given name.
*/
public String getValues(String name) {
return getValues(name, ",", true);
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Returns the values of the parameters with a given name. If multiple
* parameters with the same name are found, all values are concatenated and
* separated by a comma (like for HTTP message headers).
*
* @param name
* The parameter name (case insensitive).
* @return The values of the parameters with a given name.
*/
public String getValues(String name) {
return getValues(name, ",", true);
}
代码示例来源:origin: DeviceConnect/DeviceConnect-Android
/**
* Returns the values of the parameters with a given name. If multiple
* parameters with the same name are found, all values are concatenated and
* separated by a comma (like for HTTP message headers).
*
* @param name
* The parameter name (case insensitive).
* @return The values of the parameters with a given name.
*/
public String getValues(String name) {
return getValues(name, ",", true);
}
代码示例来源:origin: miltonio/milton2
@Override
public String getNonStandardHeader(String code) {
return getRawHeaders().getValues(code);
}
代码示例来源:origin: miltonio/milton2
@Override
public String getRequestHeader(Header header) {
return getRawHeaders().getValues(header.code);
}
代码示例来源:origin: DeviceConnect/DeviceConnect-Android
public static String getSessionId() {
String sessionId = getResourceCookieSettings().getValues(ClientCookieID);
return sessionId;
}
代码示例来源:origin: com.googlecode.redbox-mint/redbox-web-service
/**
* Verifies that the token passed is valid.
*
* TODO: While this works, this isn't the proper "Restlet" way to do it and
* should utilise the framework more.
*/
public int verify(Request request, Response response) {
String authValue = request.getHeaders().getValues("Authorization");
if (authValue == null) {
return Verifier.RESULT_MISSING;
}
String[] tokenValues = authValue.split(" ");
if (tokenValues.length < 2) {
return Verifier.RESULT_MISSING;
}
if (!"Bearer".equals(tokenValues[0])) {
return Verifier.RESULT_INVALID;
}
String token = tokenValues[1];
return checkToken(token);
}
代码示例来源:origin: org.restlet.osgi/org.restlet
@Override
public List<Range> getRanges() {
final List<Range> result = super.getRanges();
if (!this.rangesAdded) {
// Extract the header value
final String ranges = getHttpCall().getRequestHeaders().getValues(
HeaderConstants.HEADER_RANGE);
result.addAll(RangeReader.read(ranges));
this.rangesAdded = true;
}
return result;
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Returns the referrer reference if available.
*
* @return The referrer reference.
*/
@Override
public Reference getReferrerRef() {
if (!this.referrerAdded) {
final String referrerValue = getHttpCall().getRequestHeaders()
.getValues(HeaderConstants.HEADER_REFERRER);
if (referrerValue != null) {
setReferrerRef(new Reference(referrerValue));
}
this.referrerAdded = true;
}
return super.getReferrerRef();
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Returns the cookies provided by the client.
*
* @return The cookies provided by the client.
*/
@Override
public Series<Cookie> getCookies() {
Series<Cookie> result = super.getCookies();
if (!this.cookiesAdded) {
String cookieValues = getHttpCall().getRequestHeaders().getValues(
HeaderConstants.HEADER_COOKIE);
if (cookieValues != null) {
new CookieReader(cookieValues).addValues(result);
}
this.cookiesAdded = true;
}
return result;
}
代码示例来源:origin: org.restlet.osgi/org.restlet
.getValues(HeaderConstants.HEADER_ACCEPT);
String acceptCharset = getHttpCall().getRequestHeaders().getValues(
HeaderConstants.HEADER_ACCEPT_CHARSET);
String acceptEncoding = getHttpCall().getRequestHeaders()
.getValues(HeaderConstants.HEADER_ACCEPT_ENCODING);
String acceptLanguage = getHttpCall().getRequestHeaders()
.getValues(HeaderConstants.HEADER_ACCEPT_LANGUAGE);
String acceptPatch = getHttpCall().getRequestHeaders().getValues(
HeaderConstants.HEADER_ACCEPT_PATCH);
String expect = getHttpCall().getRequestHeaders().getValues(
HeaderConstants.HEADER_EXPECT);
result.setAgent(getHttpCall().getRequestHeaders().getValues(
HeaderConstants.HEADER_USER_AGENT));
result.setFrom(getHttpCall().getRequestHeaders().getFirstValue(
.getValues(HeaderConstants.HEADER_X_FORWARDED_FOR);
if (header != null) {
final String[] addresses = header.split(",");
代码示例来源:origin: org.restlet.osgi/org.restlet
@Override
public ChallengeResponse getProxyChallengeResponse() {
ChallengeResponse result = super.getProxyChallengeResponse();
if (!this.proxySecurityAdded) {
// Extract the header value
final String authorization = getHttpCall().getRequestHeaders()
.getValues(HeaderConstants.HEADER_PROXY_AUTHORIZATION);
// Set the challenge response
result = AuthenticatorUtils.parseResponse(this, authorization,
getHttpCall().getRequestHeaders());
setProxyChallengeResponse(result);
this.proxySecurityAdded = true;
}
return result;
}
代码示例来源:origin: org.restlet.osgi/org.restlet
@Override
public ChallengeResponse getChallengeResponse() {
ChallengeResponse result = super.getChallengeResponse();
if (!this.securityAdded) {
// Extract the header value
String authorization = getHttpCall().getRequestHeaders().getValues(
HeaderConstants.HEADER_AUTHORIZATION);
// Set the challenge response
result = AuthenticatorUtils.parseResponse(this, authorization,
getHttpCall().getRequestHeaders());
setChallengeResponse(result);
this.securityAdded = true;
}
return result;
}
代码示例来源:origin: org.restlet.osgi/org.restlet
String ifMatchHeader = getHttpCall().getRequestHeaders().getValues(HEADER_IF_MATCH);
String ifNoneMatchHeader = getHttpCall().getRequestHeaders().getValues(HEADER_IF_NONE_MATCH);
Date ifModifiedSince = null;
Date ifUnmodifiedSince = null;
内容来源于网络,如有侵权,请联系作者删除!