Esempio n. 1
0
        private static NetworkRequest CreateAuthRequest(string json)
        {
            NetworkRequest networkRequest = new NetworkRequest(NetworkRequestType.Get, "auth_token", json);

            if (networkRequest != null)
            {
                networkRequest.PostRequest(false);
            }
            return(networkRequest);
        }
Esempio n. 2
0
        /// <summary>Creates a network request. </summary>
        /// <param name="type">Request type</param>
        /// <param name="function">Network service type</param>
        /// <param name="json">A valid Json string</param>
        /// <returns>request</returns>
        public static NetworkRequest CreateRequest(NetworkRequestType type, string function, string json)
        {
            if (Network.serverTicket == "")
            {
                throw new ArgumentException("Scoreboard must get ticket from NetworkServices server before calling CreateRequest.");
            }
            NetworkRequest networkRequest = new NetworkRequest(type, function, json);

            if (networkRequest != null)
            {
                networkRequest.PostRequest(false);
            }
            return(networkRequest);
        }