Skip to content

//okhttp/okhttp3/Call/enqueue

enqueue

[common]\ expect abstract fun enqueue(responseCallback: Callback)

Schedules the request to be executed at some point in the future.

The OkHttpClient.dispatcher defines when the request will run: usually immediately unless there are several other requests currently being executed.

This client will later call back responseCallback with either an HTTP response or a failure exception.

Throws

kotlin.IllegalStateException when the call has already been executed.

[jvm, nonJvm]\ [jvm, nonJvm]\ actual abstract fun enqueue(responseCallback: Callback)