Package org.apache.commons.httpclient

Examples of org.apache.commons.httpclient.HttpsURL


     * @return httpURL the http URL.
     */
    public HttpURL getHttpURLExceptForUserInfo()
        throws URIException {

        return httpURL instanceof HttpsURL ? new HttpsURL(httpURL.getRawURI())
                                           : new HttpURL(httpURL.getRawURI());
    }
View Full Code Here


  }

  private static URI url(boolean isSecure, String host, int port, String path, Map<String, String> pathArgs)
      throws URIException
  {
    HttpURL url = isSecure ? new HttpsURL(host, port, "/") : new HttpURL(host, port, "/");
    url.setEscapedPath(path);
    return addQuery(url, pathArgs);
  }
View Full Code Here

                String myURI = httpURL.getEscapedURI();
                char[] childURI = (myURI + (myURI.endsWith("/") ? "" : "/")
                                   + URIUtil.encodePath(getName(href))
                    ).toCharArray();
     HttpURL childURL = httpURL instanceof HttpsURL
                                           ? new HttpsURL(childURI)
                               : new HttpURL(childURI);
    childURL.setRawAuthority(httpURL.getRawAuthority());             
                workingResource.setHttpURL( childURL,
                                           NOACTION, defaultDepth);
                workingResource.setExistence(true);
View Full Code Here

    public void setHttpURL
        (HttpURL httpURL, String additionalPath, int action, int depth)
        throws HttpException, IOException {

        setHttpURL(httpURL instanceof HttpsURL
                   ? new HttpsURL((HttpsURL) httpURL, additionalPath)
                   : new HttpURL(httpURL, additionalPath), action, depth);
    }
View Full Code Here

    public void setHttpURL
        (HttpURL httpURL, String additionalPath, int action)
        throws HttpException, IOException {

        setHttpURL(httpURL instanceof HttpsURL
                   ? new HttpsURL((HttpsURL) httpURL, additionalPath)
                   : new HttpURL(httpURL, additionalPath),
                   action, defaultDepth);
    }
View Full Code Here

     */
    public void setHttpURL(HttpURL httpURL, String additionalPath)
        throws HttpException, IOException {

        setHttpURL(httpURL instanceof HttpsURL
                   ? new HttpsURL((HttpsURL) httpURL, additionalPath)
                   : new HttpURL(httpURL, additionalPath),
                   defaultAction, defaultDepth);
    }
View Full Code Here

     */
    public void setHttpURL(String escapedHttpURL)
        throws HttpException, IOException {

        setHttpURL(escapedHttpURL.startsWith("https")
                   ? new HttpsURL(escapedHttpURL)
                   : new HttpURL(escapedHttpURL));
    }
View Full Code Here

     * @return httpURL the http URL.
     */
    public HttpURL getHttpURLExceptForUserInfo()
        throws URIException {

        return httpURL instanceof HttpsURL ? new HttpsURL(httpURL.getRawURI())
                                           : new HttpURL(httpURL.getRawURI());
    }
View Full Code Here

    private static HttpURL uriToHttpURL(String uri) throws URIException {
  if (uri.startsWith("http://")) {
      return new HttpURL(uri.toCharArray());
  }else if (uri.startsWith("https://")) {
      return new HttpsURL(uri.toCharArray());
  } else {
      throw new URIException("Unknown protocol in URL " + uri);
  }
    }
View Full Code Here

    String query = getQuery();
    String fragment = getFragment();
    if(!secure) {
      return (new HttpURL(null, host, port, path, query, fragment)).getEscapedURIReference();
    } else {
      return (new HttpsURL(null, host, port, path, query, fragment)).getEscapedURIReference();
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.commons.httpclient.HttpsURL

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.