bharath_sn
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2016
08:22 AM
HTTP POST call using roku for nested data JSON body
Hi All,
I am new to Roku TV app developing.
1> finding difficulty in executing HTTP post call from BrightScript.
Sample Code
var http_post_body = {
auth_token : abcdef,
user : {
email_id : "sa@gmail.com",
password : "welcome"
}
}
readInternet = createObject("roUrlTransfer")
readInternet.setUrl(m.top.uri)
readInternet.PostFromString(ToStr(http_post_body))
print readInternet.getToString()
/*More info*/
- I am using Task node and Screen Graph XML
- Not able to send nested json in http post calls from Roku
2> We are trying to build multi screen good UI application, please advice me if i need to use Screen Graph XML or Pure Brightscript form of coding.
Thanks and Regards
BHARATH
I am new to Roku TV app developing.
1> finding difficulty in executing HTTP post call from BrightScript.
Sample Code
var http_post_body = {
auth_token : abcdef,
user : {
email_id : "sa@gmail.com",
password : "welcome"
}
}
readInternet = createObject("roUrlTransfer")
readInternet.setUrl(m.top.uri)
readInternet.PostFromString(ToStr(http_post_body))
print readInternet.getToString()
/*More info*/
- I am using Task node and Screen Graph XML
- Not able to send nested json in http post calls from Roku
2> We are trying to build multi screen good UI application, please advice me if i need to use Screen Graph XML or Pure Brightscript form of coding.
Thanks and Regards
BHARATH
1 REPLY 1
joetesta
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2016
02:26 PM
Re: HTTP POST call using roku for nested data JSON body
From my experience thus far, I would recommend avoiding Scene Graph. It's a learning curve and seems there are disadvantages, I don't see much advantage. Others may have a different perspective.
Regarding HTTP post, you should be able to start with an example and modify it to get it working. Regarding nested JSON, I believe you will need to convert to a string prior to POST'ing
Regarding HTTP post, you should be able to start with an example and modify it to get it working. Regarding nested JSON, I believe you will need to convert to a string prior to POST'ing
aspiring