本文整理了Java中org.mozilla.zest.core.v1.ZestRequest.getUrlToken()
方法的一些代码示例,展示了ZestRequest.getUrlToken()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZestRequest.getUrlToken()
方法的具体详情如下:
包路径:org.mozilla.zest.core.v1.ZestRequest
类名称:ZestRequest
方法名:getUrlToken
[英]Gets the url token.
[中]获取url标记。
代码示例来源:origin: mozilla/zest
assertThat(deserialisedRequest.getUrlToken()).isEqualTo(urlToken);
assertThat(deserialisedRequest.getMethod()).isEqualTo(method);
assertThat(deserialisedRequest.getHeaders()).isEqualTo(headers);
代码示例来源:origin: mozilla/zest
/**
* Replace tokens.
*
* @param tokens the tokens
*/
public void replaceTokens(ZestVariables tokens) {
if (this.urlToken != null) {
this.setUrlToken(tokens.replaceInString(this.urlToken, true));
try {
this.setUrl(new URL(this.getUrlToken()));
} catch (MalformedURLException e) {
// Ignore
}
} else if (this.url != null) {
try {
this.setUrl(new URL(tokens.replaceInString(this.url.toString(), true)));
} catch (MalformedURLException e) {
// Ignore
}
}
this.setMethod(tokens.replaceInString(this.getMethod(), false));
this.setHeaders(tokens.replaceInString(this.getHeaders(), false));
this.setData(tokens.replaceInString(this.getData(), false));
for (ZestCookie cookie : this.cookies) {
cookie.setDomain(tokens.replaceInString(cookie.getDomain(), false));
cookie.setName(tokens.replaceInString(cookie.getName(), false));
cookie.setValue(tokens.replaceInString(cookie.getValue(), false));
cookie.setPath(tokens.replaceInString(cookie.getPath(), false));
}
}
内容来源于网络,如有侵权,请联系作者删除!