本文整理了Java中org.restlet.Request.setReferrerRef
方法的一些代码示例,展示了Request.setReferrerRef
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.setReferrerRef
方法的具体详情如下:
包路径:org.restlet.Request
类名称:Request
方法名:setReferrerRef
[英]Sets the referrer reference if available using an URI string. Note that when used with HTTP connectors, this property maps to the "Referer" header.
[中]使用URI字符串设置引用者引用(如果可用)。请注意,当与HTTP连接器一起使用时,此属性映射到“Referer”头。
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Sets the referrer reference if available.
*
* @param referrerRef
* The referrer reference.
*/
@Override
public void setReferrerRef(Reference referrerRef) {
getWrappedRequest().setReferrerRef(referrerRef);
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Sets the referrer reference if available using an URI string.
*
* @param referrerUri
* The referrer URI.
* @see Request#setReferrerRef(String)
*/
public void setReferrerRef(String referrerUri) {
getRequest().setReferrerRef(referrerUri);
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Sets the referrer reference if available using an URI string.
*
* @param referrerUri
* The referrer URI.
*/
@Override
public void setReferrerRef(String referrerUri) {
getWrappedRequest().setReferrerRef(referrerUri);
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Sets the referrer reference if available.
*
* @param referrerRef
* The referrer reference.
* @see Request#setReferrerRef(Reference)
*/
public void setReferrerRef(Reference referrerRef) {
getRequest().setReferrerRef(referrerRef);
}
代码示例来源:origin: org.restlet.osgi/org.restlet
/**
* Sets the referrer reference if available using an URI string. Note that
* when used with HTTP connectors, this property maps to the "Referer"
* header.
*
* @param referrerUri
* The referrer URI.
* @see #setReferrerRef(Reference)
*/
public void setReferrerRef(String referrerUri) {
setReferrerRef(new Reference(referrerUri));
}
代码示例来源:origin: stackoverflow.com
Form form = new Form();
form.add("foo", "bar");
form.add("abc", "123");
Request request = new Request(Method.POST, "http://host/path/to/resource");
request.setEntity(form.getWebRepresentation());
request.setReferrerRef("http://host/path/to/referrer");
Response response = client.handle(request);
内容来源于网络,如有侵权,请联系作者删除!