Results 1 to 1 of 1
- 06-01-2009, 11:11 AM #1Member
- Join Date
- Apr 2009
- Rep Power
Why HTTP Request Heder configuretion not working ?
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....
- By javanewbie in forum Java ServletReplies: 7Last Post: 11-11-2009, 09:29 PM
- By Eranga in forum Advanced JavaReplies: 30Last Post: 11-27-2008, 05:35 AM
- By barunva in forum Web FrameworksReplies: 1Last Post: 10-21-2008, 09:21 AM
- By barunva in forum NetworkingReplies: 0Last Post: 10-21-2008, 08:50 AM
- By sundarjothi in forum Advanced JavaReplies: 8Last Post: 05-28-2008, 07:00 AM