本文整理了Java中org.apache.commons.httpclient.URI.getEscapedURI()
方法的一些代码示例,展示了URI.getEscapedURI()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。URI.getEscapedURI()
方法的具体详情如下:
包路径:org.apache.commons.httpclient.URI
类名称:URI
方法名:getEscapedURI
[英]It can be gotten the URI character sequence. It's escaped. For the purpose of the protocol to be transported, it will be useful.
[中]可以得到URI字符序列。它逃走了。为了传输协议,它将非常有用。
代码示例来源:origin: commons-httpclient/commons-httpclient
/**
* Get the escaped URI string.
* <p>
* On the document, the URI-reference form is only used without the userinfo
* component like http://jakarta.apache.org/ by the security reason.
* But the URI-reference form with the userinfo component could be parsed.
* <p>
* In other words, this URI and any its subclasses must not expose the
* URI-reference expression with the userinfo component like
* http://user:password@hostport/restricted_zone.<br>
* It means that the API client programmer should extract each user and
* password to access manually. Probably it will be supported in the each
* subclass, however, not a whole URI-reference expression.
*
* @return the escaped URI string
* @see #clone()
*/
public String toString() {
return getEscapedURI();
}
代码示例来源:origin: commons-httpclient/commons-httpclient
LOG.debug("Redirecting from '" + currentUri.getEscapedURI()
+ "' to '" + redirectUri.getEscapedURI());
代码示例来源:origin: foxinmy/weixin4j
httpMethod = new OptionsMethod();
} else if (method == HttpMethod.TRACE) {
return new TraceMethod(uri.getEscapedURI());
} else {
throw new HttpClientException("unknown request method "
代码示例来源:origin: org.apache.commons/httpclient
/**
* Get the escaped URI string.
* <p>
* On the document, the URI-reference form is only used without the userinfo
* component like http://jakarta.apache.org/ by the security reason.
* But the URI-reference form with the userinfo component could be parsed.
* <p>
* In other words, this URI and any its subclasses must not expose the
* URI-reference expression with the userinfo component like
* http://user:password@hostport/restricted_zone.<br>
* It means that the API client programmer should extract each user and
* password to access manually. Probably it will be supported in the each
* subclass, however, not a whole URI-reference expression.
*
* @return the escaped URI string
* @see #clone()
*/
public String toString() {
return getEscapedURI();
}
代码示例来源:origin: org.wso2.commons-httpclient/commons-httpclient
/**
* Get the escaped URI string.
* <p>
* On the document, the URI-reference form is only used without the userinfo
* component like http://jakarta.apache.org/ by the security reason.
* But the URI-reference form with the userinfo component could be parsed.
* <p>
* In other words, this URI and any its subclasses must not expose the
* URI-reference expression with the userinfo component like
* http://user:password@hostport/restricted_zone.<br>
* It means that the API client programmer should extract each user and
* password to access manually. Probably it will be supported in the each
* subclass, however, not a whole URI-reference expression.
*
* @return the escaped URI string
* @see #clone()
*/
public String toString() {
return getEscapedURI();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient
/**
* Get the escaped URI string.
* <p>
* On the document, the URI-reference form is only used without the userinfo
* component like http://jakarta.apache.org/ by the security reason.
* But the URI-reference form with the userinfo component could be parsed.
* <p>
* In other words, this URI and any its subclasses must not expose the
* URI-reference expression with the userinfo component like
* http://user:password@hostport/restricted_zone.<br>
* It means that the API client programmer should extract each user and
* password to access manually. Probably it will be supported in the each
* subclass, however, not a whole URI-reference expression.
*
* @return the escaped URI string
* @see #clone()
*/
public String toString() {
return getEscapedURI();
}
代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.httpclient
/**
* Get the escaped URI string.
* <p>
* On the document, the URI-reference form is only used without the userinfo
* component like http://jakarta.apache.org/ by the security reason.
* But the URI-reference form with the userinfo component could be parsed.
* <p>
* In other words, this URI and any its subclasses must not expose the
* URI-reference expression with the userinfo component like
* http://user:password@hostport/restricted_zone.<br>
* It means that the API client programmer should extract each user and
* password to access manually. Probably it will be supported in the each
* subclass, however, not a whole URI-reference expression.
*
* @return the escaped URI string
* @see #clone()
*/
public String toString() {
return getEscapedURI();
}
代码示例来源:origin: org.zaproxy/zap
/**
* Get the escaped URI string.
* <p>
* On the document, the URI-reference form is only used without the userinfo
* component like http://jakarta.apache.org/ by the security reason.
* But the URI-reference form with the userinfo component could be parsed.
* <p>
* In other words, this URI and any its subclasses must not expose the
* URI-reference expression with the userinfo component like
* http://user:password@hostport/restricted_zone.<br>
* It means that the API client programmer should extract each user and
* password to access manually. Probably it will be supported in the each
* subclass, however, not a whole URI-reference expression.
*
* @return the escaped URI string
* @see #clone()
*/
@Override
public String toString() {
return getEscapedURI();
}
代码示例来源:origin: org.zaproxy/zap
@Override
public boolean isValid(URI redirection) {
if (!parent.nodeInScope(redirection.getEscapedURI())) {
if (logger.isDebugEnabled()) {
logger.debug("Skipping redirection out of scan's scope: " + redirection);
}
return false;
}
return true;
}
代码示例来源:origin: com.codeslap/github-jobs-java-api
private static String createUrl(String url, List<NameValuePair> pairs) throws URIException {
HttpMethod method = new GetMethod(url);
NameValuePair[] nameValuePairs = pairs.toArray(new NameValuePair[pairs.size()]);
method.setQueryString(nameValuePairs);
return method.getURI().getEscapedURI();
}
}
代码示例来源:origin: com.facebook.hadoop/hadoop-core
private static int httpNotification(String uri) throws IOException {
URI url = new URI(uri, false);
HttpClient m_client = new HttpClient();
HttpMethod method = new GetMethod(url.getEscapedURI());
method.setRequestHeader("Accept", "*/*");
return m_client.executeMethod(method);
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapred
private static int httpNotification(String uri) throws IOException {
URI url = new URI(uri, false);
HttpClient m_client = new HttpClient();
HttpMethod method = new GetMethod(url.getEscapedURI());
method.setRequestHeader("Accept", "*/*");
return m_client.executeMethod(method);
}
代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core
private static int httpNotification(String uri) throws IOException {
URI url = new URI(uri, false);
HttpClient m_client = new HttpClient();
HttpMethod method = new GetMethod(url.getEscapedURI());
method.setRequestHeader("Accept", "*/*");
return m_client.executeMethod(method);
}
代码示例来源:origin: org.springframework.android/spring-android-rest-template
public URI getURI() {
try {
return URI.create(this.httpMethod.getURI().getEscapedURI());
}
catch (URIException ex) {
throw new IllegalStateException("Could not get HttpMethod URI: " + ex.getMessage(), ex);
}
}
代码示例来源:origin: org.zaproxy/zap
@Override
public boolean isValid(URI redirection) {
if (!getParent().nodeInScope(redirection.getEscapedURI())) {
if (log.isDebugEnabled()) {
log.debug("Skipping redirection out of scan's scope: " + redirection);
}
return false;
}
return true;
}
代码示例来源:origin: SSilence/scotty
public HttpUrl createHttpsGatewayUrl(String gatewayUrl)
throws MalformedURLException, URIException {
HttpMethod method = new GetMethod(gatewayUrl);
method.setQueryString("ssl=true");
String url = method.getURI().getEscapedURI();
return new HttpUrl(url);
}
}
代码示例来源:origin: com.atlassian.ext/atlassian-plugin-repository-confluence-plugin
protected static String retrieveXML(String url)
{
HttpClient httpClient = new HttpClient();
String responseXML = "";
GetMethod get = null;
try
{
URI uri = new URI(url, false);
String escapedUrl = uri.getEscapedURI();
get = new GetMethod(escapedUrl);
httpClient.executeMethod(get);
responseXML = get.getResponseBodyAsString();
}
catch (Exception e)
{
responseXML = "<errors><error>Error retreiving XML.</error></errors>"; // *** need i18n here
}
finally
{
get.releaseConnection();
}
return responseXML;
}
代码示例来源:origin: mguessan/davmail
protected String getEscapedUrlFromPath(String escapedPath) throws URIException {
URI uri = new URI(httpClient.getHostConfiguration().getHostURL(), true);
uri.setEscapedPath(escapedPath);
return uri.getEscapedURI();
}
代码示例来源:origin: org.apache.camel/camel-http
getEndpoint().getCookieHandler().storeCookies(exchange, new URI(method.getURI().getEscapedURI()), m);
代码示例来源:origin: org.apache.camel/camel-http
m.put(e.getKey(), Collections.singletonList(e.getValue()));
getEndpoint().getCookieHandler().storeCookies(exchange, new URI(method.getURI().getEscapedURI()), m);
内容来源于网络,如有侵权,请联系作者删除!