Do i do it like this?
import cyclone
class MyHandler(cyclone.web.RequestHandler):
def get(self, command):
details = {'status':'success'}
json = json_encode(details)
self.write(json)
Or is there more to it than that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s even less than that: You can simply use
self.write(details)if it you write a dict, it will be automatically converted to JSON.