Ruby on Rails
Thursday, December 27, 2018
On Thursday, December 27, 2018 at 5:46:59 PM UTC-5, Hassan Schroeder wrote:
On Thu, Dec 27, 2018 at 2:00 PM fugee ohu <fuge...@gmail.com> wrote:
> 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"
Did you ask for JSON data via the Accept request header ?
What is the Content-Type response header you get back?
--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote
'application/json'
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/2ada905a-ade4-48b9-a5fb-538a3c0c993a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment