How do I set the API base path on the SDK?

Hi Reduct team,

I ran into an issue when I have a ReductStore instance on the cloud set with RS_API_BASE_PATH=/reduct and behind a DNS https://{domain}.

I use the reduct-cpp SDK and try to build a client by passing as url https://{domain}/reduct and it always fails returning -1.

When I use manually the underlying library you use (cpp-httplib) I manage to connect but only if I remove the /reduct path on the connection phase and then append it after on each call for instance /reduct/api/v1/info. Then I wonder how do I add the base path in the SDK so its taken into account for the calls?

Hi @vicmassy , thanks for the report. It’ might be a bug. I’ll check it.

Yes, it was a bug. I’ve pushed the patch to the main branch.

1 Like

correct @atimin solved! Thank you

1 Like