Proxy configuration

How to use

To have the SDK use your proxy to make requests, you must enter the settings to be used through an instance of the CafProxySettings class sent as a parameter to the .setProxySettings method in the builder of any of our SDKs:

let proxySettings = CafProxySettings(hostname: hostname, port: port)
    .setAutentication(user: user, password: password)

let documentDetector = DocumentDetector.CafBuilder(mobileToken: mobileToken)
    .setProxySettings(proxySettings: proxySettings)
    .build()

Constructor method

Parameter

Type

Description

hostname

String

Sets the domain or IP address of the proxy service

port

int

Sets the port to be used

Optional Methods

setAuthentication(String user, String password)

Tells you the authentication parameters of your proxy, if any.

Parameter

Description

user

Username to be used for authentication

password

Password to be used for authentication

Last updated

Logo

2023 © Caf. - All rights reserved