Spring boot :: 외부 http 불러와 body 값 리턴하는 RequestUtil (Proxy Server 기능)
2024.02.20
내가 하고 싶었던 것은 http:~ 로 된 주소에 담긴 API data 를 내가 구현한 서버에서 제공하는 거 였음. 고로 내가 구현한 서버에서 프록시 서버의 역할을 해주어야 하는 것. 이때 뭐 RestTemplete 이니 WebClient 니 설치하고 셋팅하고... 너무 귀찮았음. 그래서 간단 ver 로 requestUtil 을 만들어보았다. import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; import org.springframewo..