Пример #1
0
        private static AsyncHTTPClient CreateJSONRequestDelete(string url, AssetStoreClient.DoneCallback callback)
        {
            AsyncHTTPClient asyncHttpClient = new AsyncHTTPClient(url, "DELETE");

            asyncHttpClient.header["X-Unity-Session"] = AssetStoreClient.ActiveOrUnauthSessionID + AssetStoreClient.GetToken();
            asyncHttpClient.doneCallback = AssetStoreClient.WrapJsonCallback(callback);
            asyncHttpClient.Begin();
            return(asyncHttpClient);
        }
Пример #2
0
        private static AsyncHTTPClient CreateJSONRequestPost(string url, Dictionary <string, string> param, AssetStoreClient.DoneCallback callback)
        {
            AsyncHTTPClient asyncHttpClient = new AsyncHTTPClient(url);

            asyncHttpClient.header["X-Unity-Session"] = AssetStoreClient.ActiveOrUnauthSessionID + AssetStoreClient.GetToken();
            asyncHttpClient.postDictionary            = param;
            asyncHttpClient.doneCallback = AssetStoreClient.WrapJsonCallback(callback);
            asyncHttpClient.Begin();
            return(asyncHttpClient);
        }