For requests where we are not parsing the response, the onSuccess callback is always being called. This is because of how Moya works (a 404 server response is successful for Moya), and to solve this we must filter successful responses.
Notes:
I also added support for URL params in the requestParameters function because it was confusing for an external dev. I know that we can call Moya's requestParameters function directly to pass another encoding, but since we are providing a helper there is no harm in covering other cases other than JSON encoding and leaving it as the default param.
Description:
For requests where we are not parsing the response, the
onSuccess
callback is always being called. This is because of how Moya works (a404
server response is successful for Moya), and to solve this we must filter successful responses.Notes:
requestParameters
function because it was confusing for an external dev. I know that we can call Moya'srequestParameters
function directly to pass another encoding, but since we are providing a helper there is no harm in covering other cases other than JSON encoding and leaving it as the default param.Closes #143