Skip to content

Instantly share code, notes, and snippets.

@benelog
Last active April 18, 2019 19:38
Show Gist options
  • Save benelog/36f4294fa484565dcc654b6c6b83e3e5 to your computer and use it in GitHub Desktop.
Save benelog/36f4294fa484565dcc654b6c6b83e3e5 to your computer and use it in GitHub Desktop.
RestTemplate 활용
private fun getResponse(disqusOauthUrl: String): ResponseEntity<String> {
val endpoint = URI.create(disqusOauthUrl)
val req = RequestEntity<Any>(HttpMethod.GET, endpoint)
val resType = object : ParameterizedTypeReference<String>() {}
return RestTemplate().exchange<String>(req, resType)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment