|
@@ -31,7 +31,7 @@ public class SendingFormController : MonoBehaviour
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- public static IEnumerator PostRequest(string controller, string api, Dictionary<string, string> data, Action<string, Dictionary<string, string>> callback = null, Action<WWW> errorCallback = null)
|
|
|
|
|
|
+ /*public static IEnumerator PostRequest(string controller, string api, Dictionary<string, string> data, Action<string, Dictionary<string, string>> callback = null, Action<WWW> errorCallback = null)
|
|
{
|
|
{
|
|
WWWForm form = new WWWForm();
|
|
WWWForm form = new WWWForm();
|
|
//form.AddField("login", login);
|
|
//form.AddField("login", login);
|
|
@@ -71,7 +71,7 @@ public class SendingFormController : MonoBehaviour
|
|
//else
|
|
//else
|
|
errorCallback(www);
|
|
errorCallback(www);
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
|
|
|
|
|
|
|
|
IEnumerator PostRequest(string url, string json)
|
|
IEnumerator PostRequest(string url, string json)
|
|
@@ -144,7 +144,10 @@ public class SendingFormController : MonoBehaviour
|
|
{
|
|
{
|
|
//Debug.Log(url);
|
|
//Debug.Log(url);
|
|
//var img = UnityWebRequestTexture.GetTexture(url); //, null, headers);
|
|
//var img = UnityWebRequestTexture.GetTexture(url); //, null, headers);
|
|
-
|
|
|
|
|
|
+ img.SetRequestHeader("Access-Control-Allow-Credentials", "true");
|
|
|
|
+ img.SetRequestHeader("Access-Control-Allow-Headers", "Accept, X-Access-Token, X-Application-Name, X-Request-Sent-Time");
|
|
|
|
+ img.SetRequestHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS");
|
|
|
|
+ img.SetRequestHeader("Access-Control-Allow-Origin", "*");
|
|
yield return img.SendWebRequest();
|
|
yield return img.SendWebRequest();
|
|
if (img.isNetworkError || img.isHttpError)
|
|
if (img.isNetworkError || img.isHttpError)
|
|
{
|
|
{
|