code: def request(self, req):
          
          data = json.dumps(req)
          req = urllib2.Request(self.url, data, self.headers)
          f = self.opener.open(req)
          resp = f.read()
          f.close()
          return json.loads(resp)
docs: Makes a request against the server and returns the deserialized result.
  
          :Parameters:
            req
              List or dict representing a JSON-RPC formatted request