本文整理了Java中org.apache.http.client.utils.URIBuilder.setUserInfo()
方法的一些代码示例,展示了URIBuilder.setUserInfo()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。URIBuilder.setUserInfo()
方法的具体详情如下:
包路径:org.apache.http.client.utils.URIBuilder
类名称:URIBuilder
方法名:setUserInfo
[英]Sets URI user info. The value is expected to be unescaped and may contain non ASCII characters.
[中]设置URI用户信息。该值应为不可替换的,并且可能包含非ASCII字符。
代码示例来源:origin: git-commit-id/maven-git-commit-id-plugin
b.setUserInfo(userInfo[0]);
return b.build().toString();
代码示例来源:origin: ibinti/bugvm
/**
* Sets URI user info as a combination of username and password. These values are expected to
* be unescaped and may contain non ASCII characters.
*/
public URIBuilder setUserInfo(final String username, final String password) {
return setUserInfo(username + ':' + password);
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Sets URI user info as a combination of username and password. These values are expected to
* be unescaped and may contain non ASCII characters.
*/
public URIBuilder setUserInfo(final String username, final String password) {
return setUserInfo(username + ':' + password);
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
/**
* Sets URI user info as a combination of username and password. These values are expected to
* be unescaped and may contain non ASCII characters.
*/
public URIBuilder setUserInfo(final String username, final String password) {
return setUserInfo(username + ':' + password);
}
代码示例来源:origin: Nextdoor/bender
/**
* Sets URI user info as a combination of username and password. These values are expected to
* be unescaped and may contain non ASCII characters.
*/
public URIBuilder setUserInfo(final String username, final String password) {
return setUserInfo(username + ':' + password);
}
代码示例来源:origin: apache/juneau
/**
* Sets the URI user info.
*
* @param username The new URI username.
* @param password The new URI password.
* @return This object (for method chaining).
*/
public RestCall userInfo(String username, String password) {
uriBuilder.setUserInfo(username, password);
return this;
}
代码示例来源:origin: apache/juneau
/**
* Sets the URI user info.
*
* @param userInfo The new URI user info.
* @return This object (for method chaining).
*/
public RestCall userInfo(String userInfo) {
uriBuilder.setUserInfo(userInfo);
return this;
}
代码示例来源:origin: apache/juneau
/**
* Sets the URI user info.
*
* @param userInfo The new URI user info.
* @return This object (for method chaining).
*/
public RestCall userInfo(String userInfo) {
uriBuilder.setUserInfo(userInfo);
return this;
}
代码示例来源:origin: org.apache.juneau/juneau-rest-client
/**
* Sets the URI user info.
*
* @param userInfo The new URI user info.
* @return This object (for method chaining).
*/
public RestCall userInfo(String userInfo) {
uriBuilder.setUserInfo(userInfo);
return this;
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.apache.httpcomponents.httpclient
/**
* Sets URI user info as a combination of username and password. These values are expected to
* be unescaped and may contain non ASCII characters.
*/
public URIBuilder setUserInfo(final String username, final String password) {
return setUserInfo(username + ':' + password);
}
代码示例来源:origin: org.apache.httpcomponents/httpclient-android
/**
* Sets URI user info as a combination of username and password. These values are expected to
* be unescaped and may contain non ASCII characters.
*/
public URIBuilder setUserInfo(final String username, final String password) {
return setUserInfo(username + ':' + password);
}
代码示例来源:origin: apache/juneau
/**
* Sets the URI user info.
*
* @param username The new URI username.
* @param password The new URI password.
* @return This object (for method chaining).
*/
public RestCall userInfo(String username, String password) {
uriBuilder.setUserInfo(username, password);
return this;
}
代码示例来源:origin: org.apache.juneau/juneau-rest-client
/**
* Sets the URI user info.
*
* @param username The new URI username.
* @param password The new URI password.
* @return This object (for method chaining).
*/
public RestCall userInfo(String username, String password) {
uriBuilder.setUserInfo(username, password);
return this;
}
代码示例来源:origin: com.hynnet/httpclient
/**
* Sets URI user info as a combination of username and password. These values are expected to
* be unescaped and may contain non ASCII characters.
*/
public URIBuilder setUserInfo(final String username, final String password) {
return setUserInfo(username + ':' + password);
}
代码示例来源:origin: com.googlecode.openbox/http
public HttpBuilder setUserInfo(final String userInfo) {
uriBuilder.setUserInfo(userInfo);
return this;
}
代码示例来源:origin: eclipse/kapua
protected static String plainUrl(final String brokerUrl) {
try {
final URIBuilder u = new URIBuilder(brokerUrl);
u.setUserInfo(null);
return u.build().toString();
} catch (final URISyntaxException e) {
throw new RuntimeException("Failed to clean up broker URL", e);
}
}
代码示例来源:origin: org.eclipse.kapua/kapua-simulator-kura
protected static String plainUrl(final String brokerUrl) {
try {
final URIBuilder u = new URIBuilder(brokerUrl);
u.setUserInfo(null);
return u.build().toString();
} catch (final URISyntaxException e) {
throw new RuntimeException("Failed to clean up broker URL", e);
}
}
代码示例来源:origin: com.netflix.spinnaker.halyard/halyard-deploy
@JsonIgnore
public String getAuthBaseUrl() {
return buildBaseUri()
.get()
.setUserInfo(getUsername(), getPassword())
.toString();
}
代码示例来源:origin: spinnaker/halyard
@JsonIgnore
public String getAuthBaseUrl() {
return buildBaseUri()
.get()
.setUserInfo(getUsername(), getPassword())
.toString();
}
代码示例来源:origin: msoute/vertx-deploy-tools
private String buildRemoteRepo() {
URI remoteRepo = deployConfig.getNexusUrl();
if (remoteRepo != null && deployConfig.isHttpAuthentication()) {
URIBuilder builder = new URIBuilder(remoteRepo);
builder.setUserInfo(deployConfig.getHttpAuthUser() + ":" + deployConfig.getHttpAuthPassword());
return builder.toString();
}
return deployConfig.getNexusUrl().toString();
}
}
内容来源于网络,如有侵权,请联系作者删除!