<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
I've been have some troubles using the groovy http builder to queue
a download. I've eventually realised that what is happening is that
the GBIF API is returning a download key as a simple text string but
setting the content type to application/json. This causes
difficulties with the http builder, since by default it tries to be
helpful and parse the result as JSON. It then throws an exception,
since it tries to interpret something like <span class="jsonstring">0065397-160910150852091
as a number. (The /occurrence/count path also just returns a
count, but this is correctly interpreted as just being an
integer.)<br>
<br>
I've worked around this problem, but could future versions of the
API always return valid JSON for application/json content?<br>
<br>
Doug<br>
</span>
</body>
</html>