MMMothClientNetworking
Allows to override how MMMothClient
makes network calls. Used mainly for testing.
-
Should perform/simulate the given request.
Note that the completion has to be called on the main queue.
If overriding for non-testing purposes:
- the response has to be decoded as a JSON document;
- it has to be decoded in case of both 200 and 400 status codes, because the token endpoint uses 400 with error responses;
- other status codes can be converted into an error.
-