Make HTTPS optional for Web API

Use WebApi::setSecure() to enable or disable HTTPS. Default is enabled.