alexrainman / ModernHttpClient

ModernHttpClient
MIT License
126 stars 28 forks source link

upgrading to "modernhttpclient-updated" returns null from every request #7

Closed abdu292 closed 6 years ago

abdu292 commented 6 years ago

Hello,

I have been using modernhttpclient 2.4.2 library so far on my cross platform Xamarin app and it was working well. However I wanted to use the latest version of "modernhttpclient-updated" to be able install Square.Picasso image caching library (okhttp conflicts with old modernhttpclient package).

But, after installing one of the latest (2.6.0) of the modernhttpclient-updated packages, though the project compiles fine the request always return null. (I tried reverting the changes back to the old modernhttp lib and it started working again)

Any help would be very much helpful.

alexrainman commented 6 years ago

Can you provide a demo reproducing the issue?

abdu292 commented 6 years ago

Thank you @alexrainman

As I was trying to re-pro this on a sample project I figured out the issue. My first request (login api) was calling a POST method, without a request body ,i.e. body=null. This was working on the previous version of the modernhttpclient, but not any more on the new version, but is throwing the error, "POST method should have a request body", and hence my wrapper method was returning null. I believe this error is thrown from the latest OkHttp version.

Thanks again!

alexrainman commented 6 years ago

Is this issue still happening?

alexrainman commented 6 years ago

Version 2.7.0 has been released. Please test.