allow to publish only body

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-06-11 15:21:36 +03:00
parent 3cbc879769
commit 7098c252dc
3 changed files with 9 additions and 6 deletions

View File

@@ -573,7 +573,10 @@ func (h *httpClient) Publish(ctx context.Context, p client.Message, opts ...clie
return h.opts.Broker.Publish(ctx, topic, &broker.Message{
Header: md,
Body: body,
}, broker.PublishContext(ctx))
},
broker.PublishContext(ctx),
broker.PublishBodyOnly(options.BodyOnly),
)
}
func (h *httpClient) String() string {