I would like to trigger pipeline jobs on a 19.3 server via Java client API. Therefore, I included the labkey-client-api-1.0.1-SNAPSHOT-all.jar in the project and wrote this code:
String user = "username";
String password = "password";
BasicAuthCredentialsProvider cp = new BasicAuthCredentialsProvider(user,password);
Connection cn = new Connection("http://localhost:8080/",cp);
FileNotificationCommand cmd = new FileNotificationCommand();
FileNotificationResponse response = cmd.execute(cn, "dummy collaboration/dummy study");
The server response is a 405 with the message: "You must use the POST method when calling this action." The _httpClientContext property of the Connection object shows that a GET request has been send.
How can I configure to send a POST request?