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))); }
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)); }