请问unity3d可以使用rest_api吗?
Ta的回复 :有参考吗。一直提示 参数不对。 Dictionary<string,object> data = new Dictionary<string, object>(); data.Add("format", speechData.format); data.Add("rate", speechData.rate); data.Add("channel", speechData.channel); data.Add("cuid", speechData.cuid); data.Add("token", speechData.token); data.Add("speech", speechData.speech); string jsonDataPost = Json.Serialize(data); Dictionary<string, string> headers = new Dictionary<string, string>(); headers.Add("Content-Type", "application/json"); byte[] body = System.Text.Encoding.UTF8.GetBytes(jsonDataPost); WWW www = new WWW(speechUrl, body, headers); yield return www; Debug.Log(www.text);