dstarcev
07/27/2016, 1:09 PM@RestController
class LookupPropertyHandler {
@RequestMapping("/api/lookup", method = arrayOf(RequestMethod.GET))
fun handle(@RequestParam address: String): Any {
val html = URL("http://mysite.com")
.openConnection()
.inputStream.use {
InputStreamReader(it).use {
it.readText()
}
}
return object {
val html = html
}
}
}