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.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
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"}}]}'

0 Kudos

Re: HTTP Post with Response

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

0 Kudos