I am using this way of sending http get requests at the moment using HttpURLConnection.
(http://www.mkyong.com/java/how-to-send-http-request-getpost-in-java/)
I was wondering how would I go about not receiving the response from the request or even acknowledge it at all and just needed the request to be fired off as fast as possible how could I achieve this?
Thanks.
What you need is a "fire and forget" semantic, not directly related to http request, rather more to threads. Simply launch whatever your task is, in a new thread
Thread thread = new Thread(new Runnable(){
@Override
public void run(){
HttpURLConnectionExample http = new HttpURLConnectionExample();
System.out.println("Testing 1 - Send Http GET request");
http.sendGet();
}
});
thread.start();