ssl.NotSslRecordException

when you have a http vs https mismatch, NotSslRecordException usually occurs. Check whether the request is https.