Am 11/4/2022 um 10:27 AM schrieb Martin Honnen:


Am 11/4/2022 um 1:38 AM schrieb Erik Peterson:
The CLI basexclient uses the same client api as other clients found
here yes? https://docs.basex.org/wiki/Clients

from basexclient CLI
>BINARY GET lib/example.jpg
as expected, returns the jpg I PUT from there from my client app.
However, the same command BINARY GET from my client app, using
COMMAND         |{command}|     |{result} {info} \00|

 does not return the jpg. The bytes going to the basex server, at
least the command 'BINARY GET lib/example.jpg' part are identical in
both cases.

Which client API exactly do you use, which result or error do you get?

There is a Java sample for a binary resource online at
https://github.com/BaseXdb/basex/blob/10.3/basex-examples/src/main/java/org/basex/examples/api/BinaryExample.java
(confusingly it uses retrieve instead of BINARY GET).

I have tested that the example works with BaseX 103 if "retrieve" is
replaced by "BINARY GET".

So it seems
https://github.com/BaseXdb/basex/blob/10.3/basex-examples/src/main/java/org/basex/examples/api/BaseXClient.java
needs to be updated/patched.

Reply via email to