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
Post a Comment