Results 1 to 1 of 1
Thread: Get request
- 12-16-2011, 11:38 AM #1
Member
- Join Date
- Jul 2011
- Posts
- 7
- Rep Power
- 0
Get request
Hi
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).
If now the connection is broken thread waits 300ms to continue - but I don't need to wait, I'm not interested in the response, I just want to send it.Java Code: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?
Thanks
Similar Threads
-
Inappropriate request
By Duffed in forum Jobs DiscussionReplies: 1Last Post: 11-27-2011, 04:10 AM -
[XML-RPC Apache] The api create request handler for each request! HELP
By dario in forum Advanced JavaReplies: 0Last Post: 07-06-2011, 01:12 PM -
Run JAR from web request
By benirose in forum New To JavaReplies: 0Last Post: 06-01-2011, 06:02 PM -
First post as per request
By happyknappy in forum IntroductionsReplies: 3Last Post: 07-30-2008, 01:33 AM -
request.get not using generics
By Nicholas Jordan in forum Java ServletReplies: 4Last Post: 07-27-2008, 02:09 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks