ObjectWeb
ObjectWeb copied to clipboard
get values from post
Can not find the way to get the data passed by curl sending by post ... as one json data ... I get FieldStorage (None, None, {data})
It works like this :
import json
class NamePage(object):
def POST(self):
ObjectWeb.header("Content-Type", "application/json")
data = ObjectWeb.context["requestvars"].value
json_data = dajson.loads(data)
Ok tranks El sep 22, 2014 2:19 AM, "Raul Bustamante" [email protected] escribió:
It works like this :
import json
class A(object): def POST(self): ObjectWeb.header("Content-Type", "application/json") data = ObjectWeb.context["requestvars"].value json_data = dajson.loads(data)
— Reply to this email directly or view it on GitHub https://github.com/aisola/ObjectWeb/issues/8#issuecomment-56336888.