GH-422 Formalize Cloud Event conversion strategy to consistently handle binary-mode and structured-mode cloud events
Moved CloudEvent related artifacts to ‘cloud events’ package with hopes to eventually donating it to CNCF SDK Created CloudEventUtils identifying necessary constants and utility methods
This commit is contained in:
@@ -38,7 +38,24 @@ provides a good example on how to accomplish this.
|
||||
### Function as a REST endpoint
|
||||
|
||||
Given that SCF allows function to be exposed as REST endpoints, you can post cloud event to any of the
|
||||
functions by using function name as path (e.g., `localhost:8080/<function_name>`)
|
||||
functions by using function name as path (e.g., `localhost:8080/<function_name>`).
|
||||
|
||||
Just add this to your dependency
|
||||
|
||||
[source, xml]
|
||||
----
|
||||
<!-- REST - only needed if you intend to invoke via HTTP -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-function-web</artifactId>
|
||||
<version>3.1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!-- end REST -->
|
||||
----
|
||||
|
||||
Here is an example of curl command posting a cloud event in binary-mode:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user