Recent Java Client API Changes | Andy Straw | 2015-05-15 11:04 |
Status: Closed | ||
Here is an example URL. The URL is generated by LabKey as the value of a hidden column in the list, and corresponds to the download link for the File property. For example, the File property is called "TemplateFile", and the URL ends up in a property called "_labkeyurl_TemplateFile":/list/MyContainerPathGoesHere/download.view?entityId=a8cd2f13-a660-1032-96ac-a38b824db812&name=GateTemplate.txtI have run into another problem with this. The code above works from an external program where I can specify the username and password when I run the app. But it doesn't work when part of a transformation script where I'm authenticating by grabbing the JSESSIONID cookie name and value off the script command line, and calling addCookie() on the Connection. Calling addCookie() works if I'm using the Connection with the Labkey client API (authenticates fine), but does not work with the CloseableHttpClient object I get from that Connection. Just as when using username/password, that Client object does not have any of the authentication info that I gave the Connection, and so I have to (essentially) re-authenticate separately with the Client. So far, I haven't figure out how to do that using a cookie. As I said before: in 14.3, I didn't have to jump through any of these hoops. The executeMethod() method on Connection did all the hard work for me; but that method is no longer in the Connection API as of 15.1.Thanks.Andy |
||