Print

Print


Sara,

I have not used the "file extension" version to tell HT I want JSON
results, but if I take your first URL and change it to

http://catalog.hathitrust.org/api/volumes/brief/json/oclc:3967141?callback=mycallbackfunction

(insert /json/ after /brief instead of tacking it on as an extension) I get
a proper JavaScript/JSONP response.

For your second example, it looks like there's a PHP error message being
output that prevents the result from being
properly formatted JavaScript.  But afaict, everything on your end with
that request is OK.

cheers,

AC



On Wed, Nov 6, 2013 at 11:08 AM, sara amato <[log in to unmask]> wrote:

> Does anyone have a working example of getting jsonp from the HathiTrust
> bib API?
>
> I can get straight json (it seems to ignore the callback parameter)
>
> http://catalog.hathitrust.org/api/volumes/brief/oclc/3967141.json&callback=mycallbackfunction
>
> or jsonp with some unfortunate notices at the top (and yes, I just emailed
> their 'feedback' address and asked about this.)
>
> http://catalog.hathitrust.org/api/volumes/json/oclc:3967141&callback=mycallbackfunction
>
>
> I'm wondering if I'm just missing the correct url/syntax.
>