|
@@ -42,7 +42,7 @@ namespace GFGGame
|
|
|
public IEnumerator PostRequest(string prefixUrl, string methodName, string jsonString, Action<string> callback)
|
|
|
{
|
|
|
string url = prefixUrl + methodName;
|
|
|
- // Debug.Log(string.Format("post url:{0} postData:{1}", url, jsonString));
|
|
|
+ Debug.Log(string.Format("post url:{0} postData:{1}", url, jsonString));
|
|
|
using (UnityWebRequest webRequest = new UnityWebRequest(url, "POST"))
|
|
|
{
|
|
|
byte[] bodyRaw = Encoding.UTF8.GetBytes(jsonString);
|
|
@@ -74,7 +74,7 @@ namespace GFGGame
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- // Debug.Log("from server " + webRequest.downloadHandler.text + "\nby " + tag);
|
|
|
+ Debug.Log("from server " + webRequest.downloadHandler.text + "\nby " + tag);
|
|
|
paramCallback = webRequest.downloadHandler.text;
|
|
|
//paramCallback = System.Text.Encoding.UTF8.GetString(webRequest.downloadHandler.data, 3, webRequest.downloadHandler.data.Length - 3);
|
|
|
callback?.Invoke(paramCallback);
|