Created
January 15, 2019 10:46
-
-
Save matzew/a3ab04c065140442e83c09c6191a209b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ApplicationScoped | |
public class MyCloudEventProcessor { | |
@Incoming("from-http") | |
@Outgoing("to-http") | |
public HttpMessage<CloudEventMessage> process(CloudEventMessage<String> message) { | |
return HttpMessage.HttpMessageBuilder.<CloudEventMessage>create() | |
.withMethod("PUT") | |
.withPayload(message) | |
.withHeader("Content-Type", "application/cloudevents+json") | |
.build(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment