AdswizzHttpConfig

An HTTP configuration options that can be passed to Ad Request & Ad Reporting classes.

Instances are obtained through Builder class. Any property left unset on the builder remains null, in that case, the fallback are the default values of the SDK's HTTP networking engine.

Example:

val config = AdswizzHttpConfig.Builder()
.setConnectionTimeout(java.time.Duration.ofSeconds(5))
.setResponseTimeout(java.time.Duration.ofSeconds(10))
.setRedirectsPolicy(AdswizzHttpConfig.RedirectPolicy.NORMAL)
.setCookiePolicy(AdswizzHttpConfig.CookiePolicy.ACCEPT_ORIGINAL_SERVER)
.setHeaders(mapOf("X-Custom" to "value"))
.build()

Types

Link copied to clipboard
class Builder

Builder for AdswizzHttpConfig. All setters are optional; properties not set remain null.

Link copied to clipboard

Policy controlling which cookies are accepted from server responses.

Link copied to clipboard

Policy controlling how HTTP redirects (3xx responses) are handled.

Properties

Link copied to clipboard

Optional maximum time to wait while establishing a connection.

Link copied to clipboard

Optional policy controlling whether cookies are accepted or not. See CookiePolicy.

Link copied to clipboard

Optional HTTP headers added to every request.

Link copied to clipboard

Optional policy controlling how HTTP redirects are followed. See RedirectPolicy.

Link copied to clipboard

Optional maximum time to wait for the response after the request has been sent.

Functions

Link copied to clipboard

Returns a new Builder pre-populated with the values of this configuration.