Feature #9939

Consider exposing configuration as an API

Added by Roel Standaert 9 months ago. Updated 3 months ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


At the moment we read configuration from XML files (wt_config.xml), and wthttp command line arguments.

These are kept in classes that are not part of the public API.

We often get questions asking how to retrieve these configuration options in code, however, where the answer is a rather unsatisfying "if there's no WServer function that allows you to check it you'll have to parse the XML or command line arguments yourself".

Often enough there's the need to set those configuration options in code as well, for example when the user has their own configuration system for the rest of their software, where the answer has been "you'll have to write those out as a string or a file".

I think we should have a configuration class that is exposed in the API, that has a function to read it from XML, but also allows to set the options in plain old C++ code. We could similarly expose one for wthttp specifically. This one would only be usable if the user is using wthttp, but it doesn't really make sense to use anything else.

Also available in: Atom PDF