Code to control eventghost via http control