URL url = new URL("http://kapi.kakao.com/v1/payment/ready");
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("Authorization", "KakaoAK 어드민 키");
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded;charset=utf-8");
System.out.println("getRequestMethod():" + conn.getRequestMethod());
System.out.println("getContentType():" + conn.getContentType());
System.out.println("getResponseCode():" + conn.getResponseCode());
System.out.println("getResponseMessage():" + conn.getResponseMessage());
이렇게 하였을 경우
getRequestMethod():POST
getContentType():text/html; charset=iso-8859-1
getResponseCode():404
getResponseMessage():Not Found
이렇게 나오는데 왜 이렇게 나오는 것 일까요…?