I am calling POST webservice with below line of code.
I am not clear with connection.setDoOutput( true ); and connection.setDoInput( true );
Can you please elaborate me purpose of this code ?
Can I use same code with GET or not ?
URL url = new URL( "http://xxxxxx.com" );
HttpURLConnection connection = ( HttpURLConnection ) url.openConnection();
connection.setRequestMethod( "POST" );
connection.setDoOutput( true );
connection.setDoInput( true );
connection.setUseCaches( false );