Page 1 of 1

Send request ByteArray

Posted: 25 May 2016, 09:09
by ttienqb
Hi
In htm5/javascript, i send request type ByteArray then at server, take string different in mobile request.
exmaple:
In mobile: {"action":0,"command":20,"cards":[9]}
in html5/javascript: {"action":0,"command":20,"cards":{"Compressed":false,"BytesAvailable":1,"Length":1,"Position":0,"Bytes":[9]}}
see different "cards":
my code:
ByteArray byteArray = new ByteArray((byte[])objParam);
obj.PutByteArray(keyParam, byteArray);
how to fix that?
thank advance

Re: Send request ByteArray

Posted: 25 May 2016, 14:28
by Lapo
Hi,
I am not sure how can you send a ByteArray via Javascript API. We don't support direct use of ByteArrays.

What are you trying to send? What kind of data is it?

Thanks

Re: Send request ByteArray

Posted: 26 May 2016, 02:05
by ttienqb
it's type byte[].
example: i try send byte array id about cards. byte[] {1,3,4}.
But i must to convert from byte[] to ByteArray. to putByteArray follow syntax.
So, can u help me to fix ??
thank

Re: Send request ByteArray

Posted: 26 May 2016, 08:29
by Lapo
As I have explained, byte arrays are not supported in the HTML 5 API as of this moment.

I would simply recommend to send the cards id as numbers, instead of bytes.

Thanks