Change-Id: I77386d1b81ca651a70e25526b7313308063e996f
This commit is contained in:
rui.zhang 2019-01-09 22:23:37 +08:00
parent 85bff817e2
commit 5bbbcb9baf

View File

@ -25,13 +25,13 @@ public final class WordPress {
} }
public WordPress(String xmlRpcUrl, String username, String password) { public WordPress(String xmlRpcUrl, String username, String password) {
try {
WPConfig config = new WPConfigBuilder() WPConfig config = new WPConfigBuilder()
.xmlRpcUrl(xmlRpcUrl) .xmlRpcUrl(xmlRpcUrl)
.username(username) .username(username)
.password(password) .password(password)
.trustAll(true) .trustAll(true)
.build(); .build();
try {
client = new WPClient(config); client = new WPClient(config);
} catch (Exception e) { } catch (Exception e) {
throw new WPClientException("Error in creating wp client.", e); throw new WPClientException("Error in creating wp client.", e);