fix script error on http 204 (no content)

When the server returns no content the results are an empty string.  `JSON.parse('')` throws.