둘 다 써도 되지만... 아래처럼요
HttpURLConnection connection = (HttpURLConnection)createMerchURL.openConnection(); connection.setRequestMethod("POST"); connection.addRequestProperty("Name", "Value1"); connection.connect();
연결 상태에 따라 달라지는 작업(예: getContentLength() ,getResponseCode()과 같이)에 필요한 경우 연결해서 사용하면 되서 openConnection()을 더 많이 사용한다고 알고있어요..-이상 허접한 답변