Ejemplo n.º 1
0
 public IEnumerator PostLogin(LoginRequestData request,
                              Action <LoginResponse, long> onSuccess, Action <ErrorDetails> onError)
 {
     return(WebRequest(
                RequestType.kPOST,
                $"{baseURI}/auth",
                ConvertOnSuccess(PeekLoginResponse(onSuccess)),
                onError,
                JSONRequestBody.FromObject(request)));
 }
Ejemplo n.º 2
0
        public IEnumerator PostLogin(LoginRequestData request, Action <LoginResponse, long> onSuccess, Action <ErrorDetails> onError)
        {
            yield return(new WaitForSeconds(waitDelay));

            if (forcedError != null)
            {
                onError(forcedError);
                yield break;
            }

            onError(GenProtocolErrorDetails(400));
        }