We have JavaScript running inside WebView and a Custom Resource Handler. The JavaScript uses XMLHttpRequest to send a POST with some some JSON.
Code: JavaScript
var Request = new windows.XMLHttpRequest();
Request.open("POST", network.Url, true);
Request.setRequestHeader("Content-type", "application/json");
Request.onreadystatechange = connectHandler;
Request.send(jsonStr);
In an IHttpHandler.ProcessRequest, we can read the POST data using:
Code: Visual Basic.NET
Request.BinaryRead(Request.TotalBytes)
and we then send back a JSON response.
The WebView Custom Resource Handler receives the Request and finds that the Method is POST, but the Request.PostData is empty and the ContentLength is zero.
In a pinch we could exchange JSON using an JSExtInvokeHandler, but I would think that the POST should have worked.
BTW, the Custom Resource Handler is cool. All the GET requests come through and we send back everything to make the app happy.
Thanks,
David