Fwd: Pecan Wsme dont work

13 views
Skip to first unread message

M P Sairam

unread,
Jun 4, 2015, 12:39:25 PM6/4/15
to pytho...@googlegroups.com
Pecan with WSME doesnot work after upgrading pecan from 0.4.2 to 0.9.0

Following is my sample code:

class C1(wtypes.Base):
     id = wtypes.text
    "The UUID of the C1"

class C1Resp(wtypes.Base):
    """
    Representation of C1 Response
    """
    c1 = C1

class C1Controller(rest.RestController):
    @wsme_pecan.wsexpose(C1Resp, C1)
    def post(self, c1):
        print c1

When i send a curl request, i'm getting error "can't convert to c1"
curl -d '{"c1":{"id":"132345"}}' -H "Content-type: application/json" http://localhost:20202/c1 -X "POST"

please help me in this issue.

Thanks,
Sairam

Reply all
Reply to author
Forward
0 new messages