Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spyne client based on hierdoc serialization - json, msgpack, etc #469

Open
mtourne opened this issue Oct 2, 2015 · 0 comments
Open

spyne client based on hierdoc serialization - json, msgpack, etc #469

mtourne opened this issue Oct 2, 2015 · 0 comments

Comments

@mtourne
Copy link

mtourne commented Oct 2, 2015

here is my application

    application = MySpyneApp([MySpyneRpc],
                                 tns='my.rpc',
                                 in_protocol=JsonDocument(validator='soft'),
                                 out_protocol=JsonDocument())

and the client that tries to use it :

        c = HttpClient("http://127.0.0.1:8001/", application)
        c.my_func("foo", "bar")

unfortunately the json that goes out is :

{"message": "foo", "op": "bar"}

when it should be :

curl http://127.0.0.1:8001/ -d '{ "my_func" : { "message" : "foo", "op": "SIGN_ADMINAUTHTOKEN" } }' 

I've poked around a bit in the code and it looks like up until about here [1], the whole thing is contained neatly in request_raw.

[1] https://github.com/arskom/spyne/blob/master/spyne/client/_base.py#L102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant