code: def execute(self, http_method, path, params=None, data=None, headers=None):
      
      # Prepare URL and params
      url = self._make_url(path, params)
      if http_method in ("GET", "DELETE"):
        if data is not None:
          self.logger.warn(
              "GET method does not pass any data. Path '%s'" % (path,))
          data = None
  
      # Setup the request
      request = urllib2.Request(url, data)
      # Hack/workaround because urllib2 only does GET and POST
      request.get_method = lambda: http_method
  
      headers = self._get_headers(headers)
      for k, v in headers.items():
        request.add_header(k, v)
  
      # Call it
      self.logger.debug("%s %s" % (http_method, url))
      try:
        return self._opener.open(request)
      except urllib2.HTTPError, ex:
        raise self._exc_class(ex)
docs: Submit an HTTP request.
      @param http_method: GET, POST, PUT, DELETE
      @param path: The path of the resource.
      @param params: Key-value parameter data.
      @param data: The data to attach to the body of the request.
      @param headers: The headers to set for this request.
  
      @return: The result of urllib2.urlopen()