Is there no easier way to make a redirect to a dif...
# ktor
r
Is there no easier way to make a redirect to a different Resource when using the Resources plugin in Ktor 2 ?
Copy code
post<V1.OldPath> {
        val resources = application.plugin(Resources)
        val path = resources.resourcesFormat.encodeToPathPattern(V2.NewPath.serializer())
        call.respondRedirect(path, permanent = true)
    }
a
@Rustam Siniukov
r
you can use
Application.href
function instead of calling
encode
manually
👍 1