'Make an HTTP request and return the results
:param path: Path used with the initialized URL to make a request
:param request: HTTP request type (GET, POST, PUT, DELETE)
:param body: HTTP body of request
:key accept: Set HTTP \'Accept\' header with this value
:key base_path: Override the base_path for this request
:key content: Set HTTP \'Content-Type\' header with this value'

def request(self, path, request, body=None, **kwargs):

    out_hdrs = dict.copy(self.headers)
    if kwargs.get('accept'):
        out_hdrs['accept'] = kwargs.get('accept')
    if body:
        if isinstance(body, dict):
            body = str(json.dumps(body))
    if (body and len(body)):
        out_hdrs['content-length'] = len(body)
    zfssaurl = self._path(path, kwargs.get('base_path'))
    req = urllib.request.Request(zfssaurl, body, out_hdrs)
    req.get_method = (lambda : request)
    maxreqretries = kwargs.get('maxreqretries', 10)
    retry = 0
    response = None
    LOG.debug('Request:    %(request)s    %(url)s', {'request': request, 'url': zfssaurl})
    LOG.debug('Out    headers:    %s', out_hdrs)
    if (body and (body != '')):
        LOG.debug('Body:    %s', body)
    context = None
    if hasattr(ssl, '_create_unverified_context'):
        context = ssl._create_unverified_context()
    else:
        context = None
    while (retry < maxreqretries):
        try:
            if context:
                response = urllib.request.urlopen(req, timeout=self.timeout, context=context)
            else:
                response = urllib.request.urlopen(req, timeout=self.timeout)
        except urllib.error.HTTPError as err:
            if (err.code == http_client.NOT_FOUND):
                LOG.debug('REST    Not    Found:    %s', err.code)
            else:
                LOG.error('REST    Not    Available:    %s', err.code)
            if ((err.code == http_client.SERVICE_UNAVAILABLE) and (retry < maxreqretries)):
                retry += 1
                time.sleep(1)
                LOG.error('Server    Busy    retry    request:    %s', retry)
                continue
            if (((err.code == http_client.UNAUTHORIZED) or (err.code == http_client.INTERNAL_SERVER_ERROR)) and ('/access/v1' not in zfssaurl)):
                try:
                    LOG.error('Authorizing    request:    %(zfssaurl)s    retry:    %(retry)d.', {'zfssaurl': zfssaurl, 'retry': retry})
                    self._authorize()
                    req.add_header('x-auth-session', self.headers['x-auth-session'])
                except RestClientError:
                    pass
                retry += 1
                time.sleep(1)
                continue
            return RestResult(err=err)
        except urllib.error.URLError as err:
            LOG.error('URLError:    %s', err.reason)
            raise RestClientError((-1), name='ERR_URLError', message=err.reason)
        break
    if (response and ((response.getcode() == http_client.SERVICE_UNAVAILABLE) and (retry >= maxreqretries))):
        raise RestClientError(response.getcode(), name='ERR_HTTPError', message='REST    Not    Available:    Disabled')
    return RestResult(response=response)
