I'd like to post one file and a json object to my server. Posting as a Parameter works fine, so this works:
request.AddFile ("MyPic", organisation.Pic, "Pic.png", "image/png");
request.AddParameter ("name", "test name");
But if my JSON object is something with a nested structure like:
{organisation:{
'name':'test',
'address':{
'line1':'foo',
'line2':'foo2'
}
}}
How do I post this, while maintaining the json structure.
If I set it in the content body i.e.:
request.AddBody (organisation);
the content is posted, but the file is not posted.
Is it possible to post both a json body and file?