I use retrofit to call the API, however the server does not allow Content-Type and Content-Length as request headers for some APIs.
A modification will automatically add these two headers when making a call, any solution to prevent this behavior?
PS: interceptor for changing / deleting the header does not work bcos Content-Type and Content-Length are added after the modified construction.
PPS: I forked the Retrofit lib and tried to configure it, but couldn't find where it did the trick to add the headers. Does anyone know where to modify did the trick?
Thanks in advance!
source share