Thanks for reaching out. Depending on the depth on your use case you can choose between two options:
.setEndpoint(...) on the client builder to tell it to use that endpoint(
host) instead of cdn.contentful.com or preview.contentful.com.
if you need more control, I recommend setting up the CDAClient.Builder as usual and before calling
.build to create the current, get a call factory builder like so
.defaultCallFactoryBuilder(). This call factory builder contains all the setup from the CDAClient.Builder, but can also be used for more fine-grain control over the okhttp client. Once the callfactory builder is configured to your liking, you’d build (
.build()) the call factory and assign it to the CDAClient.Builder by using
.setCallFactory(). Now you can build the CDAClient and it’ll use the call factory provided.
I hope this makes sense and helps you.
Java SDK Developer @ Contentful