Package com.apollographql.apollo3.network.http

Types

Link copied to clipboard
class ApolloClientAwarenessInterceptor(clientName: String, clientVersion: String) : HttpInterceptor
Link copied to clipboard
class BatchingHttpEngine @JvmOverloads constructor(    val delegate: HttpEngine = DefaultHttpEngine(),     batchIntervalMillis: Long = 10,     maxBatchSize: Int = 10,     exposeErrorBody: Boolean = false) : HttpEngine
Link copied to clipboard
class BatchingHttpInterceptor @JvmOverloads constructor(    batchIntervalMillis: Long = 10,     maxBatchSize: Int = 10,     exposeErrorBody: Boolean = false) : HttpInterceptor

An HttpInterceptor that batches HTTP queries to execute multiple at once. This reduces the number of HTTP round trips at the price of increased latency as every request in the batch is now as slow as the slowest one. Some servers might have a per-HTTP-call cache making it faster to resolve 1 big array of n queries compared to resolving the n queries separately.

Link copied to clipboard
Link copied to clipboard
fun interface DataTaskFactory
Link copied to clipboard
actual class DefaultHttpEngine : HttpEngine
expect class DefaultHttpEngine : HttpEngine
actual class DefaultHttpEngine : HttpEngine
actual class DefaultHttpEngine : HttpEngine
Link copied to clipboard
class HeadersInterceptor(headers: List<HttpHeader>) : HttpInterceptor
Link copied to clipboard
class HttpCall(    engine: HttpEngine,     method: HttpMethod,     url: String)
Link copied to clipboard
interface HttpEngine

A wrapper around platform specific engines

Link copied to clipboard
class HttpInfo constructor(    val startMillis: Long,     val endMillis: Long,     val statusCode: Int,     val headers: List<HttpHeader>) : ExecutionContext.Element
Link copied to clipboard
interface HttpInterceptor
Link copied to clipboard
interface HttpInterceptorChain
Link copied to clipboard
class HttpNetworkTransport : NetworkTransport
Link copied to clipboard
class LoggingInterceptor(level: LoggingInterceptor.Level, log: (String) -> Unit = { println(it) }) : HttpInterceptor

An interceptor that logs requests and responses.

Link copied to clipboard
class StreamingNSURLSessionHttpEngine(timeoutMillis: Long) : HttpEngine

An HttpEngine based on NSURLSession with the ability to stream data as it is received when using Transfer-Encoding: Chunked. This is useful when using @defer.

Link copied to clipboard
interface TokenProvider
Link copied to clipboard
typealias UrlSessionDataTaskCompletionHandler = (NSData?, NSURLResponse?, NSError?) -> Unit

Functions

Link copied to clipboard
fun HttpEngine.get(url: String): HttpCall
Link copied to clipboard
fun HttpEngine.post(url: String): HttpCall