HttpURLConnection does only support things like GET, POST and HEAD - but no REPORT/PROPFIND. I'm going to implement a CalDAV-Client but without theese operations (if I want to use them I get a ProtocolException) I have to write/deliver a complete and huge HTTP library with auth and so on.
"Overkill".
How do I send requests with PROPFIND and REPORT?
Consider using Caldav4j
It supports:
I had similar problem on WebDav for PROPFIND method.
Solved the problem by implementing this solution: https://java.net/jira/browse/JERSEY-639
You'd probably want to look for a WebDAV libary, not an HTTP library, for this one.
Maybe take a look at Apache Jackrabbit.
You could try to use another HTTP library, such as Apache HTTP client and extend its
HttpRequestBase
(seeHttpGet
andHttpPost
for example).Alternatively, you could use a WebDAV client library directly.
Either you can use https://github.com/square/okhttp
Sample Code
Or play with Sockets
Sample Code