ObjectWeb icon indicating copy to clipboard operation
ObjectWeb copied to clipboard

get values from post

Open jhortalburq opened this issue 11 years ago • 2 comments

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})

jhortalburq avatar Sep 20 '14 08:09 jhortalburq

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)

rtbustamantec avatar Sep 22 '14 07:09 rtbustamantec

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.

jhortalburq avatar Sep 22 '14 18:09 jhortalburq