Beispiel #1
0
 private void GetCharacter(string characterID)
 {
     m_readyForNextSingleRequest = false;
     Debug.Log("Fetching character " + characterID + " from character data (call from service class)");
     m_HTTPClient.SetEndpoint(m_characterDataEndpoint);
     m_HTTPClient.Get("characters/" + characterID, OnCharacterDataResponse);
 }
Beispiel #2
0
        private void SendLoginRequest(string user, string pass)
        {
            string jsonString = JsonUtility.ToJson(new JSONAuthentificationCredentials
            {
                username = user,
                password = pass,
            }).ToString();

            m_HTTPClient.SetEndpoint(m_authEndpoint);
            m_HTTPClient.PostJSON("signin", jsonString, OnAuthenticationResponse);
        }
Beispiel #3
0
 private void SendUserInfoRequest(string id)
 {
     m_HTTPClient.SetEndpoint(m_userEndpoint);
     m_HTTPClient.Get("users/" + id, OnUserResponse);
 }