Skip to content

Commit 42f8738

Browse files
committed
set content-type when invoke binding
Signed-off-by: theonefx <[email protected]>
1 parent 641b34a commit 42f8738

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,10 @@ public <T> Mono<T> invokeBinding(InvokeBindingRequest request, TypeRef<T> type)
573573
if (metadata != null) {
574574
builder.putAllMetadata(metadata);
575575
}
576+
if (objectSerializer.getContentType() != null && !objectSerializer.getContentType().isEmpty()) {
577+
builder.putMetadata(io.dapr.client.domain.Metadata.CONTENT_TYPE, objectSerializer.getContentType());
578+
}
579+
576580
DaprProtos.InvokeBindingRequest envelope = builder.build();
577581

578582
Metadata responseMetadata = new Metadata();

0 commit comments

Comments
 (0)