Builder

class Builder

A builder for HttpNetworkTransport

Constructors

Link copied to clipboard
fun Builder()

Functions

Link copied to clipboard
fun addInterceptor(interceptor: HttpInterceptor): HttpNetworkTransport.Builder
Link copied to clipboard
fun build(): HttpNetworkTransport
Link copied to clipboard
fun exposeErrorBody(exposeErrorBody: Boolean): HttpNetworkTransport.Builder

Configures whether to expose the error body in ApolloHttpException.

Link copied to clipboard
fun httpEngine(httpEngine: HttpEngine): HttpNetworkTransport.Builder
Link copied to clipboard
fun httpHeaders(headers: List<HttpHeader>): HttpNetworkTransport.Builder
Link copied to clipboard
fun httpRequestComposer(httpRequestComposer: HttpRequestComposer): HttpNetworkTransport.Builder
Link copied to clipboard
fun interceptors(interceptors: List<HttpInterceptor>): HttpNetworkTransport.Builder
Link copied to clipboard
fun serverUrl(serverUrl: String): HttpNetworkTransport.Builder

Extensions

Link copied to clipboard
fun HttpNetworkTransport.Builder.okHttpCallFactory(okHttpCallFactory: Call.Factory): HttpNetworkTransport.Builder

Configures the HttpNetworkTransport to use the okHttpCallFactory for network requests.

Link copied to clipboard
fun HttpNetworkTransport.Builder.okHttpClient(okHttpClient: OkHttpClient): HttpNetworkTransport.Builder

Configures the HttpNetworkTransport to use the DefaultHttpEngine for network requests.