Добавить содержимое URL для responseText в Ktor - PullRequest
0 голосов
/ 14 ноября 2018


У меня есть url , который я хочу отображать в качестве содержимого моей веб-страницы с использованием Ktor framework.

fun Application.module() {
    install(DefaultHeaders)
    install(CallLogging)
    install(Routing) {

        get("/") {
            call.respondText(/*Content of that url in the output ?*/, ContentType.Text.Any)
        }
    }
}

Заранее спасибо.

1 Ответ

0 голосов
/ 14 ноября 2018

Это похоже на прокси.Вы можете проверить образец обратного прокси здесь: https://github.com/ktorio/ktor-samples/tree/master/other/reverse-proxy

...