def request(self, endpoint, headers = None, params = None, post = False):
		s = requests.Session()

		if headers is None: headers = {}
		headers.update({
			"X-Casper-API-Key": self.apiKey,
			"X-Casper-Signature": self.generateRequestSignature(params),
			"User-Agent": self.USER_AGENT
		})
		s.headers = headers

		requestURL = "{0}{1}".format(self.URL, endpoint)
		if post:
			res = s.post(requestURL, data = params, timeout = 10, verify = False)
		else:
			res = s.get(requestURL, timeout = 10, verify = False)

		try:
			rJSON = res.json()
		except __HOLE__:
			raise CasperException("Failed to decode response!")

		if res.status_code != 200:
			if "code" in rJSON and "message" in rJSON:
				raise CasperException("API Response: [{0}] {1}".format(rJSON["code"], rJSON["message"]))
			else:
				raise CasperException("API Response: [{0}] Unknown Error Message".format(res.status_code))

		return rJSON
dataset/ETHPy150Open rxw/snapy/snapy/Agent.py/CasperAgent.request