i want pass 3 field in wwwform
, contain 2 single value , json array.
here json:
{ "fname":"abc", "lname":"xyz", "marks": [{"marksa":"23","marksb":"65" }, {"marksa":"24","marksb":"56" } ] }
my current code is
void start() { wwwform form = new wwwform(); form.addfield("fname", "abc"); form.addfield("lname", "xyz"); //passing array string string mymarks = "[{\"marksa\":\"23\",\"marksb\":\"65\" },{\"marksa\":\"24\",\"marksb\":\"56\" } ]"; form.addfield("marks", mymarks); www www = new www("urltoservice", form); startcoroutine("postrequest", www); } ienumerator postrequest(www www) { yield return www; if (www.error == null) { debug.log("session saved"); } else { debug.log("www error: " + www.error); } }
but getting 500 internal server error
. please me.
Comments
Post a Comment