code: def request(self, verb, subpath, data=''):
          
          if not self.api_key or not self.api_secret:
              raise Exception("Vingd authentication credentials undefined.")
          
          endpoint = urlparse(self.api_endpoint)
          if endpoint.scheme != 'https':
              raise Exception("Invalid Vingd endpoint URL (non-https).")
          
          host = endpoint.netloc.split(':')[0]
          port = 443
          path = urljoin(endpoint.path+'/', subpath)
          
          creds = "%s:%s" % (self.api_key, self.api_secret)
          headers = {
              'Authorization': b'Basic ' + base64.b64encode(creds.encode('ascii')),
              'User-Agent': self.USER_AGENT
          }
          try:
              conn = httplib.HTTPSConnection(host, port)
              conn.request(verb.upper(), quote(path), data, headers)
              r = conn.getresponse()
              content = r.read().decode('ascii')
              code = r.status
              conn.close()
          except httplib.HTTPException as e:
              raise InternalError('HTTP request failed! (Network error? Installation error?)')
          
          try:
              content = json.loads(content)
          except:
              raise GeneralException(content, 'Non-JSON server response', code)
          
          if 200 <= code <= 299:
              try:
                  return content['data']
              except:
                  raise InvalidData('Invalid server DATA response format!')
          
          try:
              message = content['message']
              context = content['context']
          except:
              raise InvalidData('Invalid server ERROR response format!')
          
          if code == Codes.BAD_REQUEST:
              raise InvalidData(message, context)
          elif code == Codes.FORBIDDEN:
              raise Forbidden(message, context)
          elif code == Codes.NOT_FOUND:
              raise NotFound(message, context)
          elif code == Codes.INTERNAL_SERVER_ERROR:
              raise InternalError(message, context)
          elif code == Codes.CONFLICT:
              raise GeneralException(message, context)
          
          raise GeneralException(message, context, code)
docs: Generic Vingd-backend authenticated request (currently HTTP Basic Auth
          over HTTPS, but OAuth1 in the future).
          
          :returns: Data ``dict``, or raises exception.