cpjamloki
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2015
12:09 AM
Re:post json data
thanks Roku, But problem occuring here:
when i use :
---->it gives me syntax error in param why? what is wrong in param here.?
if i am not wrong param should be in completely string form here.
According to you
and Please share an example where we are sending JSON as part of a post request.
Thanks
CPJamloki
param={"abcd":{"isDevice":false,"soapRequest":{"contractAcceptanceMedium":"WEB"}},"searchCustomerProfileRestRequest":{"soapRequest":{"customerSearch":{"address":{"streetAddress1":"UgRnJhbmtsaW4gU3Q=","unitNumber":"NzY0Mg==","zipCode":"MjMyMTk="},"sessionId":""}}},"selectCustomerProfileRestRequest":{"soapRequest":{"sessionId":"","searchSelectionChoice":{}}},"queryBadDebtRestRequest":{"soapRequest":{"sessionId":"","firstName":null,"lastName":null,"emailAddress":null,"socialSecurityNumber":null,"telephoneNumber":null,"creditCheckConsent":false},"dateOfBirth":null}}
when i use :
url.AsyncPostFromString(param)
---->it gives me syntax error in param why? what is wrong in param here.?
if i am not wrong param should be in completely string form here.
According to you
you can post JSON data using AsyncPostFromString(string)but it does't allow me post my json data here as a parameter. giving syntax error in param.
and Please share an example where we are sending JSON as part of a post request.
Thanks
CPJamloki

RokuMarkn
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2015
07:00 AM
Re: Getting HTTP response code 400
Since you won't post the code and the error message as I previously asked, we can only guess, but it seems that you are passing an AssociativeArray to AsyncPostFromString. It needs to be a string, not an AA, as you yourself said in your last post. An AA is not a string. This code should work. Note that the first line is necessary since "null" is not a reserved word in Brightscript, as RokuKC already told you earlier.
If you are still having problems, please POST THE ERROR MESSAGE that you are seeing.
--Mark
null = invalid
param={"abcd":{"isDevice":false,"soapRequest":{"contractAcceptanceMedium":"WEB"}},"searchCustomerProfileRestRequest":{"soapRequest":{"customerSearch":{"address":{"streetAddress1":"UgRnJhbmtsaW4gU3Q=","unitNumber":"NzY0Mg==","zipCode":"MjMyMTk="},"sessionId":""}}},"selectCustomerProfileRestRequest":{"soapRequest":{"sessionId":"","searchSelectionChoice":{}}},"queryBadDebtRestRequest":{"soapRequest":{"sessionId":"","firstName":null,"lastName":null,"emailAddress":null,"socialSecurityNumber":null,"telephoneNumber":null,"creditCheckConsent":false},"dateOfBirth":null}}
param_string = FormatJSON(param)
url.AsyncPostFromString(param_string)
If you are still having problems, please POST THE ERROR MESSAGE that you are seeing.
--Mark
cpjamloki
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2015
07:39 AM
Re: Getting HTTP response code 400
Hi Mark,
i have send you private message regarding this on forum, please find it. here you can see :
Error generating by debug console:
Thanks
i have send you private message regarding this on forum, please find it. here you can see :
Error generating by debug console:
*** ERROR compiling /pkg:/source/services.brs:
Syntax Error. (compile error &h02) in pkg:/source/services.brs(14)
Thanks

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2015
08:23 AM
Re: Getting HTTP response code 400
@RokuMarkn, doesn't that AA syntax require the 7.x firmware? I suspect that's the source of cpjamloki's syntax error.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)

RokuMarkn
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2015
08:29 AM
Re: Getting HTTP response code 400
Yes, I realized that and sent him a PM about it.
--Mark
--Mark
- « Previous
-
- 1
- 2
- Next »