Not able to send envelope to relay docker instance


Thanks in advance for your help.

I am not able to send the envelope to relay docker instance from java service getting below response from docker.

Copying all headers header from original httpentity and creating new one.

MultiValueMap<String, String> headers = new LinkedMultiValueMap<>();
payload.getHeaders().entrySet().forEach(listEntry -> {
updatedPayload = new HttpEntity<>(maskedPayloadBody,headers);

Getting below response from relay docker instance.

400 Bad Request: [{“detail”:“invalid event envelope”,“causes”:[“missing newline after header or payload”]}]

Kindly help me on this