Package com.apollographql.apollo3.network.http

Types

ApolloClientAwarenessInterceptor
Link copied to clipboard
common
class ApolloClientAwarenessInterceptor(clientName: String, clientVersion: String) : HttpInterceptor
BatchingHttpEngine
Link copied to clipboard
common
class BatchingHttpEngine @JvmOverloads() constructor(delegate: HttpEngine, batchIntervalMillis: Long, maxBatchSize: Int) : HttpEngine
An HttpEngine that wraps another one and batches HTTP queries to execute multiple at once.
BearerTokenInterceptor
Link copied to clipboard
common
class BearerTokenInterceptor(tokenProvider: TokenProvider) : HttpInterceptor
DataTaskFactory
Link copied to clipboard
apple
fun fun interface DataTaskFactory
HeadersInterceptor
Link copied to clipboard
common
class HeadersInterceptor(headers: List<HttpHeader>) : HttpInterceptor
HttpCall
Link copied to clipboard
common
class HttpCall(engine: HttpEngine, method: HttpMethod, url: String)
HttpEngine
Link copied to clipboard
common
interface HttpEngine
A wrapper around platform specific engines
HttpInfo
Link copied to clipboard
common
class HttpInfo(millisStart: Long, millisEnd: Long, statusCode: Int, headers: List<HttpHeader>) : ExecutionContext.Element
HttpInterceptor
Link copied to clipboard
common
interface HttpInterceptor
HttpInterceptorChain
Link copied to clipboard
common
interface HttpInterceptorChain
HttpNetworkTransport
Link copied to clipboard
common
class HttpNetworkTransport constructor(httpRequestComposer: HttpRequestComposer, engine: HttpEngine, interceptors: List<HttpInterceptor>) : NetworkTransport
KtorHttpEngine
Link copied to clipboard
js
class KtorHttpEngine(connectTimeoutMillis: Long, readTimeoutMillis: Long) : HttpEngine
LoggingInterceptor
Link copied to clipboard
common
class LoggingInterceptor(log: (String) -> Unit) : HttpInterceptor
NSURLSessionHttpEngine
Link copied to clipboard
apple
class NSURLSessionHttpEngine(timeoutMillis: Long, dataTaskFactory: DataTaskFactory)
OkHttpEngine
Link copied to clipboard
class OkHttpEngine(httpCallFactory: Call.Factory) : HttpEngine
TokenProvider
Link copied to clipboard
common
interface TokenProvider
UrlSessionDataTaskCompletionHandler
Link copied to clipboard
apple
typealias UrlSessionDataTaskCompletionHandler = (NSData?, NSURLResponse?, NSError?) -> Unit

Functions

canBeBatched
Link copied to clipboard
common
fun <T : HasMutableExecutionContext<T>> HasMutableExecutionContext<T>.canBeBatched(canBeBatched: Boolean): T
get
Link copied to clipboard
common
fun HttpEngine.get(url: String): HttpCall
HttpEngine
Link copied to clipboard
fun HttpEngine(timeoutMillis: Long = 60_000): HttpEngine
fun HttpEngine(timeoutMillis: Long = 60_000): HttpEngine
post
Link copied to clipboard
common
fun HttpEngine.post(url: String): HttpCall
withCanBeBatched
Link copied to clipboard
common
fun ApolloClient.withCanBeBatched(canBeBatched: Boolean): ApolloClient
fun <D : Operation.Data> ApolloRequest<D>.withCanBeBatched(canBeBatched: Boolean): ApolloRequest<D>
withDefaultHeaders
Link copied to clipboard
common
fun HttpNetworkTransport.withDefaultHeaders(headers: List<HttpHeader>): HttpNetworkTransport.Builder
Adds a new HeadersInterceptor that will add headers to each HttpRequest