First, the Loadurl (String Url,map header) is the method used to load the add request header in the WebView
PostURL (String url,byte[] postdata) is the method used to load the add request body in WebView
But the pit is that if you want to add both the request header and the request body both methods are not available, and the android comes with the WebView does not provide a method
After searching on StackOverflow, it is useful to do other third-party encapsulated HTTP requests, but it is troublesome to say here my own approach, not necessarily for everyone,
But absolutely rude, I used the Loadurl (String Url,map header) method to stitch my request body into the URL
namely url=url+ "body=" +body;
Then use the Loadurl (String Url,map header) method to replace the URL with the request body URL, the request header is written in the MAP format, the problem is resolved, the need to do is to let the background support get method request.
My method is finished, say a digression, their first blog, and later prepared to put their own problems, especially the Chinese site can not solve the problem posted, the method is not necessarily suitable for everyone,
But it's definitely your own test success. Also hope that those who often reprint some of the wrong blog people do not waste other people's search time (at least to run their own and then reproduced it), do this line of all know
I have a problem. It's a waste of time to search for the same blog that has the wrong story.
The WebView loadurl (string Url,map header) method in Android and the PostURL (string url,byte[] postdata) method Use the problem at the same time;