Calling `getRequestUrl()` result in the HTTP request to fail with `Missing Authentication Token`
matyasberry opened this issue · comments
Subject of the issue
Calling getRequestUrl()
result in the HTTP request to fail with Missing Authentication Token
Your environment
Manjaro Linux 5.17,
JDK 17,
Algo SDK 1.13
Steps to reproduce
var query = indexer
.lookupAccountTransactions(senderAddress)
.assetId(assetId)
.notePrefix(note.getBytes(StandardCharsets.UTF_8))
.limit(2L);
System.out.println("query = " + query.getRequestUrl());
query.execute();
Expected behaviour
Successful call, just like as if I did:
var result = indexer
.lookupAccountTransactions(senderAddress)
.assetId(assetId)
.notePrefix(note.getBytes(StandardCharsets.UTF_8))
.limit(2L).execute();
Actual behaviour
HTTP 403
The problem seems to be that calling getRequestUrl()
results in multiple calls to LookupAccountTransactions.getRequestString()
which keeps adding to the path segments resulting in a wrong url.
moved to algorand/java-algorand-sdk#313