Code example for URL

Methods: toExternalForm

0
    /** 
     * Convenience XMLRPCClient constructor. Creates new instance based on server URL 
     * @param XMLRPC server URL 
     */ 
    public XMLRPCClient(URL url, String httpuser, String httppasswd) {
        this(URI.create(url.toExternalForm()), httpuser, httppasswd);
    } 
     
    /** 
     * Set WP.com auth header 
     * @param String authorization token 
     */ 
    public void setAuthorizationHeader(String authToken) {
        if( authToken != null) 
            postMethod.addHeader("Authorization", String.format("Bearer %s", authToken));
        else 
            postMethod.removeHeaders("Authorization");
    } 
 
    /** 
     * Call method with optional parameters. This is general method.