DavidWebb icon indicating copy to clipboard operation
DavidWebb copied to clipboard

No support for PATCH verb

Open tommytusj opened this issue 5 years ago • 3 comments

To use the MailChimp 3.0 you have to use the method PATCH to do updates. Any reason this has not been implemented?

tommytusj avatar Sep 26 '19 09:09 tommytusj

I see you've already made the changes in this branch: https://github.com/hgoebl/DavidWebb/tree/method_PATCH any reason it wasn't merged?

tommytusj avatar Sep 26 '19 10:09 tommytusj

I tried the branch and the first thing I noticed is that PATCH is not supported by any JDK that uses HttpURLConnection.class. This workaround does work even though it's a big hack: https://stackoverflow.com/a/46323891/142824 and I got it working in your branch.

other than that there are some tests that fail now. Testing against a remote service like google maps is going to fail sooner or later. The reflection hack above requires java 1.8 so some of the plugins in maven stopped working. Had to remove them to build successfully

tommytusj avatar Sep 26 '19 13:09 tommytusj

If you're just starting a new project, you might consider using OkHttp instead. AFAIK some Android versions use this as an HttpUrlConnection implementation. This lib could use this natively as well, but what's the point of wrapping a very powerful and easy to use library by another and losing features?

Still, it would be an alternative to use OkHttp instead of HttpUrlConnection under the hood. Currently, I've no time to change this.

hgoebl avatar Sep 26 '19 14:09 hgoebl