When did the migration from 2.2.13 to Rhodes Rhodes 4.0.0 Rho :: AsyncHttp.get function stopped working;
result = Rho::AsyncHttp.get(:url => url)
$iCodCity = result['body'].first['cd_cidade']
$sCity = result['body'].first['ds_municipio']
My:
result "{\\"ds_uf\\":\\"SC\\",\\"ds_municipio\\":\\"Florian\\xC3\\xB3polis\\",\\"cd_munic\\":\\"4205407\\"}"
use Rho::Network api instead
Rhomobile | Network
Points: 0
You voted ‘up’
Hello Adel,
I swapped stop api as you indicated more still giving the same problem:
result = Rho :: Network.get (: url => url) ['body']
iCodCity = $ result ["cd_munic"]
SUF = $ result ["ds_uf"]
Scity = $ result ["ds_municipio"]
My result: "{\\"ds_uf\\":\\"SC\\",\\"ds_municipio\\":\\"Florian\\xC3\\xB3polis\\",\\"cd_munic\\":\\"4205407\\"}"
The $ iCodCity is coming: cd_munic for: 4205407
Points: 0
You voted ‘up’
use Rho::JSON.parse to parse your result data.
Points: 0
You voted ‘up’
Thanks Adel,
Did the way you said and it worked perfectly.
result = Rho :: JSON.parse (Rho :: AsyncHttp.get (: url => url) ['body'])
Points: 0
You voted ‘up’
I know question's been answered, but just to confirm. Would Rho::Network work on WP? Anyone's tested it?
If not then this needs to be changed : Rhomobile | RhoMobile API Summary
Points: 0
You voted ‘up’
Hi Mark, tested with both API in Apple and Android:
Rho :: AsyncHttp.get (: url => url) ['body']
Rho :: Network.get (: url => url) ['body'])
Both worked perfectly.
Points: 0
You voted ‘up’
That's good news. Have you tested with 2.2 (I believe its using the old Rho::AsyncHTTP API)?
Points: 0
You voted ‘up’
Rho :: AsyncHttp.get (: url => url) ['body']
Tested on both 4.0 APIs:
Rho :: AsyncHttp.get (: url => url) ['body']
Rho :: Network.get (: url => url) ['body'])
We were happy we were able to maintain compatibility.
Points: 0
You voted ‘up’
Whoa, Hold your horses, this was what I got thru email :
Hi Mark, tested with both API in WP8:
Rho :: AsyncHttp.get (: url => url)
Rho :: Network.get (: url => url) )
Both worked perfectly.
I thought you mentioned about WP, not Apple or Android. Strange, but your posts seem to have been edited after the email was sent by Jive
Points: 0
You voted ‘up’
Points: 0
You voted ‘up’
Hmm. Looks like there's a problem with Jive...
Ok, so just to confirm : you haven't tested on Windows Phone, have you?
Points: 0
You voted ‘up’
I have not tested on windows phone.
Points: 0
You voted ‘up’
Ok, let's see if others have. Thanks
Points: 0
You voted ‘up’