Web API using Jquery

63 views
Skip to first unread message

mpuga

unread,
Apr 30, 2012, 1:18:42 AM4/30/12
to conceptnet-users
Hi guys,

Did anyone manage use the Web API using Jquery?
You will then get an Uncaught SyntaxError: Unexpected token : error.
This is because I'm expecting json data, but the headers on the server
are sending text/html - not application/json.

Any idea?

Rob Speer

unread,
May 2, 2012, 3:00:20 PM5/2/12
to conceptn...@googlegroups.com
You should be able to set "datatype: 'json'" in the settings that you
pass to jQuery.ajax():
http://api.jquery.com/jQuery.ajax/

-- Rob
> --
> You received this message because you are subscribed to the Google Groups "conceptnet-users" group.
> To post to this group, send email to conceptn...@googlegroups.com.
> To unsubscribe from this group, send email to conceptnet-use...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/conceptnet-users?hl=en.
>
Reply all
Reply to author
Forward
0 new messages