Issue 14267
Support jsonp callback in nub lookup
14267
Reporter: feedback bot
Type: Improvement
Summary: Support jsonp callback in nub lookup
Priority: Major
Status: Reopened
Created: 2013-10-21 08:46:02.181
Updated: 2013-12-19 16:21:07.273
Description: (Oops! Forgot to put my email last time.)
Incredible new API services - well done everyone.
I am using the API for 2 calls - one which seems to support a jsonp callback parameter (http://api.gbif.org/v0.9/occurrence/search) and one which returns a 406 Not Acceptable error if you include a callback parameter. Example code below using dojo.request:
script.get("http://api.gbif.org/v0.9/occurrence/search", {
query : {
geometry : boundingbox,
taxon_key : 5227762
},
jsonp : "callback"
}).then(function(response) {
console.log(response); //works fine
});
script.get("http://api.gbif.org/v0.9/species/match", {
query : {
name : 'Argusianus argus'
},
jsonp : "callback"
}).then(function(response) {
taxon_key = response.usageKey; //406 error
});
Any help greatly appreciated.
Best wishes,
Andrew Cottam
Joint Research Centre
*Reporter*: Andrew Cottam
*E-mail*: [mailto:andrew.cottam@jrc.ec.europa.eu]]]>