In Java I am able to specify http header using
client = new DefaultHttpClient();
HttpGet get = new HttpGet(url);
get.addHeader(key, value);
Now I need to create an html form, how do I pass the same data information?
In Java I am able to specify http header using
client = new DefaultHttpClient();
HttpGet get = new HttpGet(url);
get.addHeader(key, value);
Now I need to create an html form, how do I pass the same data information?
You cannot, with pure HTML, cause the user's browser to send a particular header (other than Post-Data
and so on).
If you need to send HTTP headers you'll have to use a Javascript XMLHTTPRequest
or other dynamic device. See this SO question.