Network Configuration
Represents the network communication configuration allowing the tracker to be able to send events to the Snowplow collector.
Default values:
method: HttpMethod.POST
protocol: Protocol.HTTPS
timeout: 5 seconds
Functions
A custom path which will be added to the endpoint URL to specify the complete URL of the event collector when paired with the POST method. The default path is "com.snowplowanalytics/snowplow/tp2". The collector must be configured to accept the custom path.
An OkHttp client that will be used in the emitter. You can provide your own if you want to share your Singleton client's interceptors, connection pool etc. By default a new OkHttpClient is created when the tracker is instantiated.
An OkHttp cookie jar to override the default CollectorCookieJar that stores cookies in SharedPreferences. A cookie jar provided here will be ignored if a custom okHttpClient
is configured.
Custom headers to add to HTTP requests to the collector.
The timeout set for the requests to the collector. The maximum timeout for emitting events. If emit time exceeds this value TimeOutException will be thrown.
Properties
A custom path which will be added to the endpoint URL to specify the complete URL of the collector when paired with the POST method.
Custom NetworkConnection
instance to use for sending events.
An OkHttp client that will be used in the emitter. You can provide your own if you want to share your Singleton client's interceptors, connection pool etc. By default a new OkHttpClient is created when the tracker is instantiated.
An OkHttp cookie jar to override the default CollectorCookieJar that stores cookies in SharedPreferences. A cookie jar provided here will be ignored if a custom okHttpClient
is configured.
Custom headers to add to HTTP requests to the collector.