Results 1 to 1 of 1
Thread: Get request
- 12-16-2011, 12:38 PM #1Member
- Join Date
- Jul 2011
- Rep Power
how to send a GET request - but only send not to get the response?
U used HttpURLConnection and URLConnection and this type of operation only work if I get the inputStream (in that time the request is sent).
HttpURLConnection connection = (HttpURLConnection)left.openConnection(); connection.setDoInput(true); connection.setDoOutput(true); connection.setUseCaches(false); connection.setReadTimeout(300); connection.connect(); connection.getInputStream();
The is a second disadvantage of this: If the connection is back and I've for example 3 times called the function above it will be executed 3 time - how to clear the cache of the connection to prevent it?
- By Duffed in forum Jobs DiscussionReplies: 1Last Post: 11-27-2011, 05:10 AM
- By dario in forum Advanced JavaReplies: 0Last Post: 07-06-2011, 02:12 PM
- By benirose in forum New To JavaReplies: 0Last Post: 06-01-2011, 07:02 PM
- By happyknappy in forum IntroductionsReplies: 3Last Post: 07-30-2008, 02:33 AM
- By Nicholas Jordan in forum Java ServletReplies: 4Last Post: 07-27-2008, 03:09 PM