# DEBUG
		info = "=" * 50 + "\n"
		info += "Method:    %s\n" % method
		info += "URL:       %s\n" % full_url
		info += "Headers:   %s\n" % str(header)
		info += "GET data:  %s\n" % str(get)
		info += "POST data: %s\n" % str(post)
		info += "Files:     %s\n" % str(files)
		info += "Streaming: %s\n" % str(stream)
		info += "JSON:      %s\n" % str(is_json)
		info += "=" * 50
		print info
		# END DEBUG

def do_request(self, method, url, callback_url = None, get = None, post = None, files = None, stream = False, is_json = True):
		if files == {}:
			files = None
		self._multipart = files is not None
		header = self.get_oauth_header(method, url, callback_url, get, post)
		if get:
			full_url = url + "?" + urllib.urlencode(get)
		else:
			full_url = url
		"""# DEBUG
		info = "=" * 50 + "\n"
		info += "Method:    %s\n" % method
		info += "URL:       %s\n" % full_url
		info += "Headers:   %s\n" % str(header)
		info += "GET data:  %s\n" % str(get)
		info += "POST data: %s\n" % str(post)
		info += "Files:     %s\n" % str(files)
		info += "Streaming: %s\n" % str(stream)
		info += "JSON:      %s\n" % str(is_json)
		info += "=" * 50
		print info
		# END DEBUG"""
		if method.upper() == "POST":
			response = requests.post(full_url, data = post, files = files, headers = header, stream = stream, timeout = self.timeout)
		else:
			response = requests.get(full_url, data = post, files = files, headers = header, stream = stream, timeout = self.timeout)
		"""# DEBUG
		print ("\nResponse:  %s\n" % response.text) + "=" * 50
		# END DEBUG"""
		if response.status_code != 200:
			try:
				data = response.json()
				try:
					raise APIError(code = data['errors'][0]['code'], description = data['errors'][0]['message'], body = response.text or None)
				except TypeError:
					raise APIError(code = None, description = data['errors'])
			except APIError:
				raise
			except:
				description = " ".join(response.headers['status'].split()[1:]) if response.headers.get('status', None) else "Unknown Error"
				raise APIError(code = response.status_code, description = description, body = response.text or None)
		if stream:
			return response
		if is_json:
			try:
				return response.json()
			except:
				return response.text
		else:
			return response.text