apiVersion: camel.apache.org/v1 | |
kind: Integration | |
metadata: | |
name: RestDsl | |
spec: | |
flows: | |
- rest-configuration: | |
component: "platform-http" | |
context-path: "/base" | |
port: 8081 | |
- rest: | |
path: "/demo" | |
post: | |
- path: "/foo" | |
to: "direct:foo" | |
- path: "/bar" | |
to: "direct:bar" | |
get: | |
- path: "/getFoo" | |
to: "direct:foo" | |
- path: "/getBar" | |
to: "direct:foo" | |
- from: | |
uri: 'direct:foo' | |
steps: | |
- log: '${body}' | |
- log: '${headers}' | |
- setBody: | |
constant: "Hello world" |