fun bind(builder: Builder, urls: List<String>): Builder
Bind this session to an OkHttpClient. This will add an interceptor and override any authenticators already defined. Any requests not matching the host will be denied.
builder
- An instance of the OkHttpClient.Builder to use
urls
- A list of urls the OkHttpClient will be used for. This will match sub-paths as well
Return
An OkHttpClient.Builder to which the authenticator and interceptor are attached
fun bind(builder: Builder, urls: List<String>, allowNonHttps: Boolean, allowNonWhitelistedDomains: Boolean): Builder
Bind this session to an OkHttpClient. This will add an interceptor and override any authenticators already defined. Any requests not matching the host will be denied.
builder
- An instance of the OkHttpClient.Builder to use
urls
- A list of urls the OkHttpClient will be used for. This will match sub-paths as well
allowNonHttps
- By default, non-HTTPS requests are denied. Setting this to true will override this.
This is not recommended and is done at your own risk.
allowNonWhitelistedDomains
- By default, requests to non-whitelisted domains is not allowed. Set this
to true to override that.
Return
An OkHttpClient.Builder to which the authenticator and interceptor are attached