I could see there are two separate methods in Android docs to post the data and add the headers.
For setting Headers
public void loadUrl (String url, Map
It seems that the framework does not provide these features together.
Looking at the source code of WebViewCore (https://android.googlesource.com/platform/frameworks/base/+/eclair-release%5E2/core/java/android/webkit/WebViewCore.java, line 889), additional headers are processed only in the loadUrl
call and never in the postUrl
.