Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
crawfishmedia
Channel Surfer

HTTP Post with Response

Hi all,
I have been reading the docs tonight regarding GET data in the HTTP request body, I'm somewhat confused. Can someone please confirm that Roku does not support sending data in the request body and then receiving the response data? According to the docs it appears to be discarded on purpose. I tried POST with no luck. I am not sure how to send data in the body using GET.
I am integrating with Elasticsearch. I need to send a search query to Elasticsearch, then gather the search response.
A working curl command would look like this:
curl -X GET 'http://<server>/index/_search' -d '{"size":10,"sort":[{"date_saved":{"order":"desc"}}]}'


Thanks
0 Kudos
1 REPLY 1
RokuMarkn
Visitor

Re: HTTP Post with Response

You can send data with AsyncPostFromString or AsyncPostFromFile and read the returned body from the roUrlEvent.

--Mark
0 Kudos