FileNotificationCommand failes with "You must use the POST method when calling this action." error

LabKey Support Forum
FileNotificationCommand failes with "You must use the POST method when calling this action." error Ronny Kursawe  2020-04-24 08:29
Status: Closed
 

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?

 
 
chetc (LabKey Support) responded:  2020-05-12 15:32

Hello,

This was actually a bug that we recently addressed. It has been fixed in version 1.2.1-SNAPSHOT. I believe you should be able to use your existing code with 1.2.1, but if you have any issues please let us know.

Thanks,
Chet

 
chetc (LabKey Support) responded:  2020-05-18 14:05

Hello,

I was mistaken in my last post. We've addressed the issue, but it's not yet available for public use. I am not positive of when it will be available but I will update this post once we have a date or release.

Thanks,
Chet