-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathExample.java
More file actions
28 lines (21 loc) · 767 Bytes
/
Example.java
File metadata and controls
28 lines (21 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright 1999-2016. Parallels IP Holdings GmbH. All Rights Reserved.
class Example {
public static void main(String[] args) throws Exception {
String login = System.getenv("REMOTE_LOGIN");
String password = System.getenv("REMOTE_PASSWORD");
String host = System.getenv("REMOTE_HOST");
if (null == login) {
login = "admin";
}
PleskApiClient client = new PleskApiClient(host);
client.setCredentials(login, password);
String request =
"<packet>" +
"<server>" +
"<get_protos/>" +
"</server>" +
"</packet>";
String response = client.request(request);
System.out.println(response);
}
}