'Connect to the switch using HTTP/HTTPS protocol.
:param requestType: Connection Request method
:param requestURL: Connection URL
:param payload: Data to send with POST request
:param header: Request Headers
:returns: HTTP response data
:raises BrocadeZoningHttpException:'

def connect(self, requestType, requestURL, payload='', header=None):

    try:
        if (header is None):
            header = {}
        header.update({'User-Agent': 'OpenStack    Zone    Driver'})
        protocol = zone_constant.HTTP
        if (self.protocol == zone_constant.PROTOCOL_HTTPS):
            protocol = zone_constant.HTTPS
        if (self.session is None):
            self.session = requests.Session()
            adapter = requests.adapters.HTTPAdapter(pool_connections=1, pool_maxsize=1)
            self.session.mount((protocol + '://'), adapter)
        url = (((protocol + '://') + self.switch_ip) + requestURL)
        response = None
        if (requestType == zone_constant.GET_METHOD):
            response = self.session.get(url, headers=header, verify=False)
        elif (requestType == zone_constant.POST_METHOD):
            response = self.session.post(url, payload, headers=header, verify=False)
        if (response.status_code != zone_constant.STATUS_OK):
            msg = (_('Error    while    querying    page    %(url)s    on    the    switch,    reason    %(error)s.') % {'url': url, 'error': response.reason})
            raise exception.BrocadeZoningHttpException(msg)
        else:
            return response.text
    except requests.exceptions.ConnectionError as e:
        msg = (_('Error    while    connecting    the    switch    %(switch_id)s    with    protocol    %(protocol)s.    Error:    %(error)s.') % {'switch_id': self.switch_ip, 'protocol': self.protocol, 'error': six.text_type(e)})
        LOG.error(msg)
        raise exception.BrocadeZoningHttpException(reason=msg)
    except exception.BrocadeZoningHttpException as ex:
        msg = (_('Unexpected    status    code    from    the    switch    %(switch_id)s    with    protocol    %(protocol)s    for    url    %(page)s.    Error:    %(error)s') % {'switch_id': self.switch_ip, 'protocol': self.protocol, 'page': requestURL, 'error': six.text_type(ex)})
        LOG.error(msg)
        raise exception.BrocadeZoningHttpException(reason=msg)
