redirect

fun redirect(url: String, status: Short = definedExternally): Response(source)

The redirect() static method of the Response interface returns a Response resulting in a redirect to the specified URL.

MDN Reference


fun redirect(url: URL, status: Short = definedExternally): Response(source)