DefaultHttpEngine

class DefaultHttpEngine : HttpEngine

Parameters

timeoutMillis

: The timeout interval to use when connecting or waiting for additional data.

  • on iOS, it is used to set NSMutableURLRequest.timeoutIntervalForRequest

  • on Android, it is used to set both OkHttpClient.connectTimeout and OkHttpClient.readTimeout

  • on Js, it is used to set both connectTimeoutMillis, and socketTimeoutMillis

timeoutMillis

: The timeout interval to use when connecting or waiting for additional data.

  • on iOS, it is used to set NSMutableURLRequest.timeoutIntervalForRequest

  • on Android, it is used to set both OkHttpClient.connectTimeout and OkHttpClient.readTimeout

  • on Js, it is used to set both connectTimeoutMillis, and socketTimeoutMillis

timeoutMillis

: The timeout interval to use when connecting or waiting for additional data.

  • on iOS, it is used to set NSMutableURLRequest.timeoutIntervalForRequest

  • on Android, it is used to set both OkHttpClient.connectTimeout and OkHttpClient.readTimeout

  • on Js, it is used to set both connectTimeoutMillis, and socketTimeoutMillis

timeoutMillis

: The timeout interval to use when connecting or waiting for additional data.

  • on iOS, it is used to set NSMutableURLRequest.timeoutIntervalForRequest

  • on Android, it is used to set both OkHttpClient.connectTimeout and OkHttpClient.readTimeout

  • on Js, it is used to set both connectTimeoutMillis, and socketTimeoutMillis

Constructors

DefaultHttpEngine
Link copied to clipboard
fun DefaultHttpEngine(connectTimeout: Long, readTimeout: Long)
DefaultHttpEngine
Link copied to clipboard
fun DefaultHttpEngine(okHttpClient: OkHttpClient)
DefaultHttpEngine
Link copied to clipboard
fun DefaultHttpEngine(timeoutMillis: Long = 60_000)
: The timeout interval to use when connecting or waiting for additional data.
fun DefaultHttpEngine(timeoutMillis: Long = 60_000)
fun DefaultHttpEngine(timeoutMillis: Long = 60_000)
fun DefaultHttpEngine(timeoutMillis: Long = 60_000)

Functions

dispose
Link copied to clipboard
apple
open override fun dispose()
Disposes any resources used by the HttpEngineUse this to dispose a connection pool for an example.
js
open override fun dispose()
Disposes any resources used by the HttpEngineUse this to dispose a connection pool for an example.
open override fun dispose()
Disposes any resources used by the HttpEngineUse this to dispose a connection pool for an example.
common
abstract fun dispose()
Disposes any resources used by the HttpEngineUse this to dispose a connection pool for an example.
execute
Link copied to clipboard
apple
open suspend override fun execute(request: <ERROR CLASS>): <ERROR CLASS>
Executes the given HttpRequestthrows ApolloNetworkException if a network error happens HTTP errors should not throw but instead return a HttpResponse indicating the status code
js
open suspend override fun execute(request: HttpRequest): HttpResponse
Executes the given HttpRequestthrows ApolloNetworkException if a network error happens HTTP errors should not throw but instead return a HttpResponse indicating the status code
open suspend override fun execute(request: HttpRequest): HttpResponse
Executes the given HttpRequestthrows ApolloNetworkException if a network error happens HTTP errors should not throw but instead return a HttpResponse indicating the status code
common
abstract suspend fun execute(request: <ERROR CLASS>): <ERROR CLASS>
Executes the given HttpRequestthrows ApolloNetworkException if a network error happens HTTP errors should not throw but instead return a HttpResponse indicating the status code

Properties

disposed
Link copied to clipboard
js
var disposed: Boolean = false