Skip to content

Commit

Permalink
progress on data structures setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mary cochran authored and mary cochran committed Jun 5, 2020
1 parent 35fae96 commit 5e8c7c4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
15 changes: 11 additions & 4 deletions camel-k-grub-hub/RestWithUndertow.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import org.apache.camel.model.rest.RestBindingMode;

public class RestWithUndertow extends org.apache.camel.builder.RouteBuilder {

private final String order = "{'beverages': [{'item': 'ESPRESSO_DOUBLE','name': 'Mickey'},{'item': 'COFFEE_BLACK','name': 'Minnie'}]}";
@Override
public void configure() throws Exception {
restConfiguration()
Expand All @@ -21,7 +23,12 @@ public void configure() throws Exception {
.transform().simple("Hello!");

from("direct:order")
.log("Body is ${body}");
.log("Body is ${body}")
.setBody(constant(order))
.setHeader(Exchange.HTTP_METHOD, constant("POST"))
.setHeader(Exchange.CONTENT_TYPE, constant("application/json"))
.setHeader("Accept",constant("application/json"))
.log("Body after transformation is ${body} with headers: ${headers}");

}

Expand All @@ -34,23 +41,23 @@ public String getOrderId() {
return orderId;
}

public void setOrderId(String orderId) {
public void setOrderId(final String orderId) {
this.orderId = orderId;
}

public String getOrderItem() {
return orderItem;
}

public void setOrderItem(String orderItem) {
public void setOrderItem(final String orderItem) {
this.orderItem = orderItem;
}

public String getName() {
return name;
}

public void setName(String name) {
public void setName(final String name) {
this.name = name;
}

Expand Down
4 changes: 4 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
jdk:
- openjdk8
install:
- mvn clean install -f ./quarkus-cafe-core/pom.xml

0 comments on commit 5e8c7c4

Please sign in to comment.