Skip to content

Commit 720195e

Browse files
author
theonefx.chenx
committed
more check
1 parent 58c7e77 commit 720195e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sdk/src/main/java/io/dapr/client/DaprClientImpl.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,9 @@ public <T> Mono<T> invokeBinding(InvokeBindingRequest request, TypeRef<T> type)
573573
if (metadata != null) {
574574
builder.putAllMetadata(metadata);
575575
}
576-
builder.putMetadata(io.dapr.client.domain.Metadata.CONTENT_TYPE, objectSerializer.getContentType());
576+
if (objectSerializer.getContentType() != null && !objectSerializer.getContentType().isEmpty()) {
577+
builder.putMetadata(io.dapr.client.domain.Metadata.CONTENT_TYPE, objectSerializer.getContentType());
578+
}
577579

578580
DaprProtos.InvokeBindingRequest envelope = builder.build();
579581

0 commit comments

Comments
 (0)