Issue
I am converting this to a Typescript Service for our React web application. Below is the Original API in Java. What is the Typescript Response data type? Blob?
@GET
@Path("/{vendorId}/Photo}")
@Produces("image/png")
byte[] getVendorPhoto(@PathVariable long vendorId);
Solution
The JS equivalent of Java byte
type is a Int8Array
. Because the Java byte
is a signed 8-bit integer.
const byteArray = new Int8Array(new ArrayBuffer(arrayOfInts));
Answered By - Poul Kruijt
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.