Add support for waiting for webapi to be ready