I don't want receive any response of server after send GET request

- Hi, i use this code below to send a simple GET request to http://domain.com/index.php

- my problem is: I don't want receive any response of server after send GET request.

- Thanks.

try{

URL url =new URL("http://domain.com/index.php?request=1");

URLConnection urlCon;

try{

urlCon = url.openConnection();

urlCon.setRequestProperty("Connection","close");

urlCon.getInputStream();

}catch(IOException e){

e.printStackTrace();

}

}catch(MalformedURLException e){

e.printStackTrace();

}

[1028 byte] By [NhTina] at [2007-11-26 21:55:44]
# 1
So just ignore the response. Don't open the stream, or close it without reading anything.
jverda at 2007-7-10 3:51:48 > top of Java-index,Java Essentials,New To Java...
# 2
I think you have to open the input stream, or the request doesn't get sent. But there's certainly nothing that says you have to read from the input stream.
DrClapa at 2007-7-10 3:51:48 > top of Java-index,Java Essentials,New To Java...