Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

How to get the function handler based on a URL? #196

Open
jodinathan opened this issue Jan 28, 2017 · 0 comments
Open

How to get the function handler based on a URL? #196

jodinathan opened this issue Jan 28, 2017 · 0 comments

Comments

@jodinathan
Copy link
Contributor

Hi,

I need to create a batch controller that will execute several other handlers.
Like the facebook graph API, where you can do single post requests and you can also group them into one post that facebook will parse all items like they were sent one by one and return the results in an array.
Request example:
[
{ url: '/something/one', data: { hi: '1'} },
{ url: '/something/two', data: { hi: '2'} }
]
So my batch controller must iterate through that array, parse the requests and return the result of each handler.
I am currently using Mock requests, however, the problem is the result of each execution.
My handlers returns an object that is parsed into a Map and then parsed to a string by redstone.
With mock requests, after executing the handler, the result is a string within mockContent, then I have to parse the string into an map and then into an object for later use.
I would like to skip all that. Since my handlers already return the object I need.

I tried to look into redstone source but it is quite complex, maybe you guys can give me some help to do this faster.

http://stackoverflow.com/questions/40268489/batch-url-execution-with-redstone

thanks

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

No branches or pull requests

1 participant