code: def handler(ca_file=None):
      
  
      def request(url, message, **kwargs):
          scheme, host, port, path = spliturl(url)
  
          if scheme != "https": 
              ValueError("unsupported scheme: %s" % scheme)
  
          connection = HTTPSConnection(host, port, ca_file)
          try:
              body = message.get('body', "")
              headers = dict(message.get('headers', []))
              connection.request(message['method'], path, body, headers)
              response = connection.getresponse()
          finally:
              connection.close()
  
          return {
              'status': response.status,
              'reason': response.reason,
              'headers': response.getheaders(),
              'body': BytesIO(response.read())
          }
  
      return request
docs: Returns an HTTP request handler configured with the given ca_file.