On Thu, 27 Dec 2018 at 22:00, fugee ohu <fugee...@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":[{"productId"
Forget about how to parse it for the moment. Is the data you want in the response? Colin -- 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+unsubscr...@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/CAL%3D0gLtSpHpFkAV2AaRrX0s8Y5cvaww62j%2Bz9Gxqrhn3_c_Opg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.