"""
 
 import re
+import ssl
 import http.client as client
 import urllib.parse as parse
 import logging
     headers = {"Content-Type": "application/x-www-form-urlencoded",
                "Accept": "text/plain"}
 
-    conn = client.HTTPSConnection("localhost")
+    # Allow for an HTTPS connection with self-signed certificates
+    context = ssl._create_unverified_context()
+    conn = client.HTTPSConnection("localhost", context=context)
     conn.request(method, url, body, headers)
     resp = conn.getresponse()
     logging.info("Request status %s and response %s",