Need access to THttpServer from TRootanaEventLoop descendants

Issue #12 resolved
Former user created an issue

I need access to THttpServer instance from a child class of TRootanaEventLoop. I need this instance to tune the HTTP server in some way. For example - set cross-origin headers via THttpServer.SetCors method. Thanks

Comments (1)

  1. Thomas Lindner

    OK, I think I implemented this how you want. Specifically, I added a function that allows child classes to modify the THttpServer. The extra function is implemented in TRootanaEventLoop as

    #ifdef HAVE_THTTP_SERVER THttpServer* GetTHttpServer(); #endif

    Ie, the function has pre-processor requirements, to ensure that the code works if your version of ROOT did not build THttpServer.

    So in order to use this function you must either 1) Include the pre-processor flag -DHAVE_THTTP_SERVER in your Makefile 2) Include the include file before you include the function in your child class.

  2. Log in to comment