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 <javascript:>> 
> 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 
> <javascript:> 
> twitter: @hassan 
> Consulting Availability : Silicon Valley or remote 
>

So I need to pass in accept request header json as the first parameter to 
NET::HTTP ? 

-- 
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/68e4443e-a8d9-46e5-9ee5-4a4a8bc59b49%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to