Socket 을 이용하여 웹서버에 POST 요청 예제 import java.io.*; import java.net.*; public class SocketPOST { public static void main(String[] args) { //Sending a POST Request Using a Socket try { // Construct data String data = URLEncoder.encode("key1", "UTF-8") + "=" + URLEncoder.encode("value1", "UTF-8"); data += "&" + URLEncoder.encode("key2", "UTF-8") + "=" + URLEncoder.encode("홍길동", "UTF-8"); // Create a socket to the host //String hos.. 더보기 이전 1 ··· 2076 2077 2078 2079 2080 2081 2082 ··· 2196 다음