I have made a client tool in which user can configure http request headers, and view response accordingly but looks like this headers are not working.
I have configure "Accept" request header to value "image/jpeg" using - public void setRequestProperty(String key,String value) method of HttpURLConnection class. which means that my client program accepts only image. and which is only of jpeg format. But when i connect to any valid URL (website). And i found that web server is sending me same html format as by default, ie. no effect of request headers. bec. i see that server sends html, text, other images format also, even though i indicate that my client accepts only image and that of jpeg format only. Why request headers not working ?

plz...help....its an urgent......!
Waiting for your reply....