public static void CreateRequest(Dictionary <string, string> form) { form.Add("ssid", spreadsheetId); form.Add("pass", servicePassword); EditorApplication.update += EditorUpdate; if (usePOST) { CloudConnectorCore.UpdateStatus("Establishing Connection at URL " + webServiceUrl); www = UnityWebRequest.Post(webServiceUrl, form); } else // Use GET. { string urlParams = "?"; foreach (KeyValuePair <string, string> item in form) { urlParams += item.Key + "=" + item.Value + "&"; } CloudConnectorCore.UpdateStatus("Establishing Connection at URL " + webServiceUrl + urlParams); www = UnityWebRequest.Get(webServiceUrl + urlParams); } startTime = EditorApplication.timeSinceStartup; www.Send(); }
public void CreateRequest(Dictionary <string, string> form) { form.Add("ssid", spreadsheetId); form.Add("pass", servicePassword); if (usePOST) { CloudConnectorCore.UpdateStatus("Establishing Connection at URL " + webServiceUrl); www = UnityWebRequest.Post(webServiceUrl, form); } // Use GET. else { string urlParams = "?"; foreach (KeyValuePair <string, string> item in form) { urlParams += item.Key + "=" + item.Value + "&"; } CloudConnectorCore.UpdateStatus("Establishing Connection at URL " + webServiceUrl + urlParams); www = UnityWebRequest.Get(webServiceUrl + urlParams); } StartCoroutine(ExecuteRequest(form)); }