WebDAV Java Request to Nextcloud with Proxy

65 Views Asked by At

I want to build a Java Service where I can upload and download files by WebDAV from my Nextcloud Server. Now I have some problems:

  • I have to use a proxy server for the connection to Nextcloud
  • I couldn't find out if I have to use the Nextcloud Header "OCS-APIRequest=true" also for WebDAV Requests
  • I have never used WebDAV in Java and think I must use a library like Sardine?

I have tried yet to build a connection with Sardine and a HttpClient but didn't get it to run and don't know if it just didn't work cause the OCS-APIRequest-Header was missing.

Unfortunately all I found searching the net where examples of the Sardine.put() method which I unfortunately didn't understand.

Does anyone maybe have an example where is described how to do all this together? Or maybe a good documentation of the Sardine library? Or any other hint which could help here?

Thx in advance!

BR Forfaro

0

There are 0 best solutions below