Ruby on Rails Thursday, December 27, 2018



On Thursday, December 27, 2018 at 5:17:05 PM UTC-5, Colin Law wrote:
On Thu, 27 Dec 2018 at 22:00, fugee ohu <fuge...@gmail.com> wrote:
>
>
>
> On Thursday, December 27, 2018 at 4:04:55 PM UTC-5, Hassan Schroeder wrote:
>>
>> On Thu, Dec 27, 2018 at 12:24 PM fugee ohu <fuge...@gmail.com> wrote:
>>
>> > So then how
>>
>> 1) choose HTTP client
>> 2) send request
>> 3) parse response
>>
>> --
>> Hassan Schroeder ------------------------ hassan.s...@gmail.com
>> twitter: @hassan
>> Consulting Availability : Silicon Valley or remote
>
>
> Net::HTTP.get(<url>) returns a string
> data = JSON.parse(response)
> JSON::ParserError: 765: unexpected token at 'jQuery18300000644047005491_1545822229753({"success":true,"code":0,"results":[{"productIdes"

Forget about how to parse it for the moment.  Is the data you want in
the response?

Colin

yes

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/7245e736-6cf0-46d8-a9bb-bf8bbd9c3e83%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment