# ImplicitFlowControlCallback


```
abstract class ImplicitFlowControlCallback : UrlRequest.Callback
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||
| ↳ | [org.chromium.net.UrlRequest.Callback](https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest.Callback) ||
|   | ↳ | [org.chromium.net.apihelpers.ImplicitFlowControlCallback](https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/ImplicitFlowControlCallback) |

Known direct subclasses [InMemoryTransformCronetCallback](https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/InMemoryTransformCronetCallback)

|---|---|
| `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/InMemoryTransformCronetCallback` | An abstract Cronet callback that reads the entire body to memory and optionally deserializes the body before passing it back to the issuer of the HTTP request. |

Known indirect subclasses [ByteArrayCronetCallback](https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/ByteArrayCronetCallback), [JsonCronetCallback](https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/JsonCronetCallback), [StringCronetCallback](https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/StringCronetCallback)

|---|---|
| `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/ByteArrayCronetCallback` | A specialization of `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/InMemoryTransformCronetCallback` which returns the body bytes verbatim without any interpretation. |
| `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/JsonCronetCallback` | A specialization of `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/InMemoryTransformCronetCallback` that interprets the response body as JSON. |
| `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/StringCronetCallback` | A specialization of `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/InMemoryTransformCronetCallback` that interprets the response body as a string. |

*** ** * ** ***

An implementation of `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest.Callback` that takes away the difficulty of managing the request lifecycle away, and automatically proceeds to read the response entirely.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/ImplicitFlowControlCallback#ImplicitFlowControlCallback()()` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/ImplicitFlowControlCallback#onCanceled(org.chromium.net.UrlRequest,org.chromium.net.UrlResponseInfo)(request: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest!, info: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlResponseInfo!)` Invoked if request was canceled via `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest#cancel()`. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/ImplicitFlowControlCallback#onFailed(org.chromium.net.UrlRequest,org.chromium.net.UrlResponseInfo,org.chromium.net.CronetException)( request: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest!, info: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlResponseInfo!, error: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/CronetException! )` Invoked if request failed for any reason after `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest#start()`. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/ImplicitFlowControlCallback#onReadCompleted(org.chromium.net.UrlRequest,org.chromium.net.UrlResponseInfo,java.nio.ByteBuffer)( request: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest!, info: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlResponseInfo!, byteBuffer: https://developer.android.com/reference/java/nio/ByteBuffer.html! )` Invoked whenever part of the response body has been read. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/ImplicitFlowControlCallback#onRedirectReceived(org.chromium.net.UrlRequest,org.chromium.net.UrlResponseInfo,java.lang.String)( request: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest!, info: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlResponseInfo!, newLocationUrl: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html! )` Invoked whenever a redirect is encountered. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/ImplicitFlowControlCallback#onResponseStarted(org.chromium.net.UrlRequest,org.chromium.net.UrlResponseInfo)(request: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest!, info: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlResponseInfo!)` Invoked when the final set of headers, after all redirects, is received. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/ImplicitFlowControlCallback#onSucceeded(org.chromium.net.UrlRequest,org.chromium.net.UrlResponseInfo)(request: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest!, info: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlResponseInfo!)` Invoked when request is completed successfully. |

| ### Protected functions |
|---|---|
| `abstract https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/ImplicitFlowControlCallback#onBodyChunkRead(org.chromium.net.UrlResponseInfo,java.nio.ByteBuffer)(info: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlResponseInfo!, bodyChunk: https://developer.android.com/reference/java/nio/ByteBuffer.html!)` Invoked whenever part of the response body has been read. |
| `abstract https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/ImplicitFlowControlCallback#onCanceled(org.chromium.net.UrlResponseInfo)(info: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlResponseInfo?)` Invoked if request was canceled via `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest#cancel()`. |
| `abstract https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/ImplicitFlowControlCallback#onFailed(org.chromium.net.UrlResponseInfo,org.chromium.net.CronetException)(info: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlResponseInfo?, exception: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/CronetException!)` Invoked if request failed for any reason after `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest#start()`. |
| `abstract https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/ImplicitFlowControlCallback#onResponseStarted(org.chromium.net.UrlResponseInfo)(info: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlResponseInfo!)` Invoked when the final set of headers, after all redirects, is received. |
| `abstract https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/ImplicitFlowControlCallback#onSucceeded(org.chromium.net.UrlResponseInfo)(info: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlResponseInfo!)` Invoked when request is completed successfully. |
| `abstract https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/apihelpers/ImplicitFlowControlCallback#shouldFollowRedirect(org.chromium.net.UrlResponseInfo,java.lang.String)(info: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlResponseInfo!, newLocationUrl: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!)` Invoked whenever a redirect is encountered. |

## Public constructors

### ImplicitFlowControlCallback

```
ImplicitFlowControlCallback()
```

## Public functions

### onCanceled

```
fun onCanceled(request: UrlRequest!, info: UrlResponseInfo!): Unit
```

Invoked if request was canceled via `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest#cancel()`. Once invoked, no other `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest.Callback` methods will be invoked. Default implementation takes no action.

| Parameters |
|---|---|
| `request: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest!` | Request that was canceled. |
| `info: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlResponseInfo!` | Response information. May be `null` if no response was received. |

### onFailed

```
fun onFailed(
    request: UrlRequest!,
    info: UrlResponseInfo!,
    error: CronetException!
): Unit
```

Invoked if request failed for any reason after `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest#start()`. Once invoked, no other `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest.Callback` methods will be invoked. `error` provides information about the failure.

| Parameters |
|---|---|
| `request: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest!` | Request that failed. |
| `info: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlResponseInfo!` | Response information. May be `null` if no response was received. |
| `error: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/CronetException!` | information about error. |

### onReadCompleted

```
fun onReadCompleted(
    request: UrlRequest!,
    info: UrlResponseInfo!,
    byteBuffer: ByteBuffer!
): Unit
```

Invoked whenever part of the response body has been read. Only part of the buffer may be populated, even if the entire response body has not yet been consumed. With the exception of `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest.Callback#onCanceled(org.chromium.net.UrlRequest,org.chromium.net.UrlResponseInfo)`, no other `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest.Callback` method will be invoked for the request, including `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest.Callback#onSucceeded(org.chromium.net.UrlRequest,org.chromium.net.UrlResponseInfo)` and `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest.Callback#onFailed(org.chromium.net.UrlRequest,org.chromium.net.UrlResponseInfo,org.chromium.net.CronetException)`, until `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest#read(java.nio.ByteBuffer)` is called to attempt to continue reading the response body.

| Parameters |
|---|---|
| `request: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest!` | Request that received data. |
| `info: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlResponseInfo!` | Response information. |
| `byteBuffer: https://developer.android.com/reference/java/nio/ByteBuffer.html!` | The buffer that was passed in to `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest#read(java.nio.ByteBuffer)`, now containing the received data. The buffer's position is updated to the end of the received data. The buffer's limit is not changed. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/Exception.html` | if an error occurs while processing a read completion. `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest.Callback#onFailed(org.chromium.net.UrlRequest,org.chromium.net.UrlResponseInfo,org.chromium.net.CronetException)` will be called with the thrown exception set as the cause of the `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/CallbackException`. |

### onRedirectReceived

```
fun onRedirectReceived(
    request: UrlRequest!,
    info: UrlResponseInfo!,
    newLocationUrl: String!
): Unit
```

Invoked whenever a redirect is encountered. This will only be invoked between the call to `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest#start()` and `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest.Callback#onResponseStarted(org.chromium.net.UrlRequest,org.chromium.net.UrlResponseInfo)`. The body of the redirect response, if it has one, will be ignored. The redirect will not be followed until the URLRequest's `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest#followRedirect()` method is called, either synchronously or asynchronously.

| Parameters |
|---|---|
| `request: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest!` | Request being redirected. |
| `info: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlResponseInfo!` | Response information. |
| `newLocationUrl: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | Location where request is redirected. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/Exception.html` | if an error occurs while processing a redirect. `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest.Callback#onFailed(org.chromium.net.UrlRequest,org.chromium.net.UrlResponseInfo,org.chromium.net.CronetException)` will be called with the thrown exception set as the cause of the `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/CallbackException`. |

### onResponseStarted

```
fun onResponseStarted(request: UrlRequest!, info: UrlResponseInfo!): Unit
```

Invoked when the final set of headers, after all redirects, is received. Will only be invoked once for each request. With the exception of `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest.Callback#onCanceled(org.chromium.net.UrlRequest,org.chromium.net.UrlResponseInfo)`, no other `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest.Callback` method will be invoked for the request, including `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest.Callback#onSucceeded(org.chromium.net.UrlRequest,org.chromium.net.UrlResponseInfo)` and `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest.Callback#onFailed(org.chromium.net.UrlRequest,org.chromium.net.UrlResponseInfo,org.chromium.net.CronetException)`, until `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest#read(java.nio.ByteBuffer)` is called to attempt to start reading the response body.

| Parameters |
|---|---|
| `request: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest!` | Request that started to get response. |
| `info: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlResponseInfo!` | Response information. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/Exception.html` | if an error occurs while processing response start. `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest.Callback#onFailed(org.chromium.net.UrlRequest,org.chromium.net.UrlResponseInfo,org.chromium.net.CronetException)` will be called with the thrown exception set as the cause of the `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/CallbackException`. |

### onSucceeded

```
fun onSucceeded(request: UrlRequest!, info: UrlResponseInfo!): Unit
```

Invoked when request is completed successfully. Once invoked, no other `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest.Callback` methods will be invoked.

| Parameters |
|---|---|
| `request: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest!` | Request that succeeded. |
| `info: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlResponseInfo!` | Response information. |

## Protected functions

### onBodyChunkRead

```
protected abstract fun onBodyChunkRead(info: UrlResponseInfo!, bodyChunk: ByteBuffer!): Unit
```

Invoked whenever part of the response body has been read. Only part of the buffer may be populated, even if the entire response body has not yet been consumed. The buffer is ready for reading. Buffers are reused internally so the implementing class shouldn't store the buffer or use it anywhere else than in the implementation of this method.

| Parameters |
|---|---|
| `info: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlResponseInfo!` | Response information. |
| `bodyChunk: https://developer.android.com/reference/java/nio/ByteBuffer.html!` | The buffer that contains the received data, flipped for reading. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/Exception.html` | if an error occurs while processing a read completion. onFailed will be called with the thrown exception set as the cause of the `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/CallbackException`. |

### onCanceled

```
protected abstract fun onCanceled(info: UrlResponseInfo?): Unit
```

Invoked if request was canceled via `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest#cancel()`. Once invoked, no other `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest.Callback` methods will be invoked.

| Parameters |
|---|---|
| `info: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlResponseInfo?` | Response information. May be `null` if no response was received. |

### onFailed

```
protected abstract fun onFailed(info: UrlResponseInfo?, exception: CronetException!): Unit
```

Invoked if request failed for any reason after `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest#start()`. Once invoked, no other `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest.Callback` methods will be invoked. `error` provides information about the failure.

| Parameters |
|---|---|
| `info: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlResponseInfo?` | Response information. May be `null` if no response was received. |
| `exception: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/CronetException!` | information about error. |

### onResponseStarted

```
protected abstract fun onResponseStarted(info: UrlResponseInfo!): Unit
```

Invoked when the final set of headers, after all redirects, is received. Will only be invoked once for each request. It's guaranteed that Cronet doesn't start reading the body until this method returns.

| Parameters |
|---|---|
| `info: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlResponseInfo!` | Response information. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/Exception.html` | if an error occurs while processing response start. onFailed will be called with the thrown exception set as the cause of the `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/CallbackException`. |

### onSucceeded

```
protected abstract fun onSucceeded(info: UrlResponseInfo!): Unit
```

Invoked when request is completed successfully. Once invoked, no other `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest.Callback` methods will be invoked.

| Parameters |
|---|---|
| `info: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlResponseInfo!` | Response information. |

### shouldFollowRedirect

```
protected abstract fun shouldFollowRedirect(info: UrlResponseInfo!, newLocationUrl: String!): Boolean
```

Invoked whenever a redirect is encountered. This will only be invoked between the call to `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest#start()` and `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlRequest.Callback#onResponseStarted(org.chromium.net.UrlRequest,org.chromium.net.UrlResponseInfo)`. The body of the redirect response, if it has one, will be ignored.

| Parameters |
|---|---|
| `info: https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/UrlResponseInfo!` | Response information. |
| `newLocationUrl: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | Location where request is redirected. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | true if the redirect should be followed, false if the request should be canceled. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/Exception.html` | if an error occurs while processing a redirect. onFailed will be called with the thrown exception set as the cause of the `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/CallbackException`. |