How do you send byte[] array in retrofit call. I just need to send over byte[]. I get this exception when I have been trying to send a retrofit call.
ret
For retrofit2:
@POST("/send")
void upload(@Body RequestBody bytes, Callback cb);
usage:
byte[] params = ...
RequestBody body = RequestBody.create(MediaType.parse("application/octet-stream"), params);
remoteService.upload(body, new Callback() {
@Override
public void success(String s, Response response) {
//Success Handling
}
@Override
public void failure(RetrofitError retrofitError) {
//Error Handling
}
});