Commits

Shu Zong Chen committed 71f6c2b

building out http actions for tornado client

Comments (0)

Files changed (1)

apollo/clients/tornadoclient.py

 		)
 		client = AsyncHTTPClient()
 		client.fetch(request, partial(self.__on_fetch, cb, okay_code))
+
+	def get(self, method, cb, data=None, **kwargs):
+		return self.__fetch(
+			"GET",
+			200,
+			method,
+			cb = cb,
+			data = data,
+			**kwargs
+		)
+	
+	def post(self, method, cb, data=None, **kwargs):
+		return self.__fetch(
+			"GET",
+			201,
+			method,
+			cb = cb,
+			data = data,
+			**kwargs
+		)
+	
+	def delete(self, method, cb, data=None, **kwargs):
+		return self.__fetch(
+			"DELETE",
+			200,
+			method,
+			cb = cb,
+			data = data,
+			**kwargs
+		)
+
+	def post(self, method, cb, data=None, **kwargs):
+		return self.__fetch(
+			"PUT",
+			200,
+			method,
+			cb = cb,
+			data = data,
+			**kwargs
+		)
+