Closed alfonzjanfrithz closed 4 years ago
Hi @alfonzjanfrithz
Sorry for the late response, I was off on PTO. Gotcha, great that you found this, I wasn't aware at all. And yes, if it's possible for you to create a PR, I'd love to verify it and get it in, appreciate a lot. Ideally your PR would also include unit-tests so that we have the confidence not breaking your fix in future evolutions.
PR was merged, closing.
Hi @alfonzjanfrithz
sorry, for the late reply. Your PR was merged, thanks a lot!
To reproduce this issue:
This leads to a the following problem:
The reason why is that the following method in
DefaultClient.java
does have a mechanism to handle a null payload. When the null is passed, theisPayloadlessMethod(method)
only only cater forGET
.Okio.source()
can't accept null valueWorkaround I have to create input stream that has empty string.
Note The overloaded
getPayload()
method didnt get this issue, because it handle the null payload.I am happy to raise the PR for this if needed. Thanks!