UnityScriptでHTTP POST
POSTを待ち受けているURLに対して scoreというパラメータをPOSTする場合は、
function sendScore(score : String){ var postUrl = "http://localhost:3000/unity_sample_score"; var wwwForm: WWWForm = new WWWForm(); wwwForm.AddField("score", score); var getText: WWW = new WWW(postUrl, wwwForm); yield getText; Debug.Log(getText); }
これでいけた