JAVA로 주소를 좌표로 변환하려는데 REST API 개발가이드를 참고하고있습니다.
String auth = "KakaoAK " + KAKAO_KEY;
URL link= new URL("https://dapi.kakao.com/v2/local/search/address.json");
HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() {
public boolean verify(String arg0, SSLSession arg1) {
return true;
}
});
HttpsURLConnection hc = (HttpsURLConnection)link.openConnection();
hc.setRequestMethod("GET");
hc.setRequestProperty("User-Agent", "Java-Client"); // https 호출시 user-agent 필요
hc.setRequestProperty("X-Requested-With", "curl");
hc.setRequestProperty("Authorization", auth);
카카오 인증키의 경우 Authorization이라는 이름으로 헤더에 담아서 보내면 인증은 정상적으로 되는것 같습니다만
주소를 보내는 - -data-urlencode “query=전북 삼성동 100” 이라는게 어디에 담아서 보내야되는지 이해가 잘 안갑니다.
참고할만한 자료나 예시를 가르쳐주시길 바랍니다.