Update HttpsWebAPI not to block UI thread