Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 580 Bytes

http-redirect.md

File metadata and controls

16 lines (11 loc) · 580 Bytes

By default, the Ktor client redirects to URLs provided in the Location header. If required, you can disable redirections.

Add dependencies {id="add_dependencies"}

HttpRedirect only requires the ktor-client-core artifact and doesn't need any specific dependencies.

Disable redirects {id="disable"}

To disable redirections, set the followRedirects property to false in a client configuration block:

val client = HttpClient(CIO) {
    followRedirects = false
}