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

Improve /rpc endpoint to accept embedded JSON objects as requests #24

Merged
merged 2 commits into from Mar 11, 2016

Conversation

KiNgMaR
Copy link
Contributor

@KiNgMaR KiNgMaR commented Mar 11, 2016

With this change, also embedded JSON objects will be accepted as "request"s, i.e. without them being wrapped in a string.

Before it was necessary to cruft (I mean craft) a request like this:

'{"service":"foo.bar","method":"FooBar.FizzBuzz","request":"{\"trip\":{\"pickupDateTime\":\"2016-03-13T12:00:00Z\",\"returnDateTime\":\"2016-03-15T12:00:00Z\"},\"pointOfSaleCountry\":\"US\"}"}'

With this PR, also this more natural approach works:

'{"service":"foo.bar","method":"FooBar.FizzBuzz","request":{"trip":{"pickupDateTime":"2016-03-13T12:00:00Z","returnDateTime":"2016-03-15T12:00:00Z"},"pointOfSaleCountry":"US"}}'

What do you think?

Ingmar Runge added 2 commits March 11, 2016 08:36
With this change, also embedded JSON objects will be accepted as
"request"s, i.e. without them being wrapped in a string.
asim pushed a commit that referenced this pull request Mar 11, 2016
Improve /rpc endpoint to accept embedded JSON objects as requests
@asim asim merged commit 6b34fe6 into micro:master Mar 11, 2016
milosgajdos pushed a commit to milosgajdos/micro that referenced this pull request Oct 20, 2019
Experimental server side wrappers for handlers
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

Successfully merging this pull request may close these issues.

None yet

2 participants