I want to add some custom data in http header and send it to another web application so I can access that data. How can I do that, please help.
2 Answers
Easiest way to do is use java.net.HttpURLConnection.addRequestProperty() method. E.g
httpURLConnection.addRequestProperty("User-Agent",
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)");
Check documentation for more details.