android - How could i change CONTENT-TYPE of WebView#PostUrl()? -


in android webview.

i'm trying use webview#posturl() postdata. couldn't find way of changing content-type of request. it's "application/x-www-form-urlencoded".

how can change that?

    stringbuilder sb = new stringbuilder();     sb.append("<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n");     sb.append("<resource>\r\n");     sb.append("<element a=\"a\" b=\"b\"/>\r\n");      sb.append("</resource>");     string postdata = sb.tostring();      mwebview.posturl(url, postdata.getbytes()); 

thank you!

from webview documentation, looks you're stuck default content-type. found this helpful parsing data in api endpoint since couldn't change content-type application/json or easier digest.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -