Skip to content

Commit

Permalink
Fix for errors on larger queries
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrendtro committed Apr 21, 2022
1 parent 5fda93b commit 2bfed57
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/API/Explorer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,22 @@ export default class ExplorerApi {
}).join('&');

try {
response = await f(this.endpoint + '/' + this.namespace + path + (queryString.length > 0 ? '?' + queryString : ''));
if ( queryString.length < 1000 ) {
response = await f(this.endpoint + '/' + this.namespace + path + (queryString.length > 0 ? '?' + queryString : ''));
}
else {
response = await f(
this.endpoint + '/' + this.namespace + path,
{
headers: {
'accept': '*.*',
'content-type': 'application/json'
},
method: 'POST',
body: JSON.stringify(args)
}
)
}

json = await response.json();
} catch (e) {
Expand Down

0 comments on commit 2bfed57

Please sign in to comment.