nodes icon indicating copy to clipboard operation
nodes copied to clipboard

ObjectMapper uses writeValueAsString()

Open ODie0x03B7 opened this issue 4 years ago • 0 comments

In Fetch.java/send(...) ObjectMapper is invoked with writeValueAsString() and the string is immediately converted to bytes:

String requestParams = mapper.writeValueAsString(request);
byte[] postData = requestParams.getBytes();

This could be replaced by

byte[] postData = mapper.writeValueAsBytes(request);

if I understand correctly?

ODie0x03B7 avatar Jun 04 '20 06:06 ODie0x03B7