OneDrive / onedrive-sdk-android

OneDrive SDK for Android!
https://dev.onedrive.com
Other
148 stars 52 forks source link

Workaround for Http PATCH in <=19 Devices #25

Closed peternied closed 8 years ago

peternied commented 8 years ago

I've added the X-HTTP-Method-Override as suggested (thanks @isabsent). I also discovered that this method is not supported with the OneDrive for Business endpoint. In this arena we can use PUT instead of PATCH, which is supported.

Addresses issue #16 & #23

peternied commented 8 years ago

If you would like to verify this works, please use https://jitpack.io/#peternied/onedrive-sdk-android/PATCH-SNAPSHOT to pull in this pull request.

isabsent commented 8 years ago

Works fine on API 16. I did not check this condition

Build.VERSION.SDK_INT <= Build.VERSION_CODES.JELLY_BEAN_MR2

when I offered X-HTTP-Method-Override workaround. It may be MR1, KitKat or something else. Did you check? You have mentioned

Workaround for Http PATCH in <=19 Devices

in the header of this topic. But 19 = KitKat, not MR2.

peternied commented 8 years ago

Thanks for checking @isabsent I've actually gone and removed the build# from the mix to make this change more straight-forward

isabsent commented 8 years ago

Works fine on 4.1.2 (API 16) and 5.0.0 (API 21).