0

I'm working on a contacts app on NativeScript, so I need to connect to a webdav server with PROPFIND method. I'm working on Android. Eveything works on a node project, but in NativeScript I can't manage to get an answer from my PROPFIND request.

I tried with 3 different methods, each of them being OK in node and KO in nativescript. UPDATE : I also tried on React Native, and it worked like a charm.

My results in NativeScript :

core HTTP from nativescript :

"HTTP erreur Error: java.net.ProtocolException: Expected one of [OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, PATCH] but was PROPFIND"

axiox :

"Error: Request failed with status code null"

Fetch :

"TypeError: Network request failed"

If I change the method (GET or POST instead of PROPFIND), I receive "normal" http errors related to the face that it's not the good method.

--> could it be a dead end with Native Script ? I hope there is a way to bypass this and use webdav methods in Native Script ! Thanks++.

Loic Dub'
  • 1
  • 1
  • 1
  • The error does seem to suggest that this is a problem with the client. There are many more HTTP methods than just those 7 so it's strange they limited it. – Evert May 04 '20 at 14:34
  • I think it's Android / Java issue, couple workarounds are discussed in https://stackoverflow.com/questions/25163131/httpurlconnection-invalid-http-method-patch – Manoj May 04 '20 at 14:39

0 Answers0