product = products.add(product);
/**
* Just for fun, set a response header containing the URL to the newly created Product.
*/
String location = new RegexParameterizedPatternBuilder(event.getContextPath()
+ "/store/product/{pid}").build(Arrays.<Object> asList(product.getId()));
Response.addHeader("Location", location).perform(event, context);
event.getResponse().setContentType("text/html");
((HttpInboundServletRewrite) event).sendStatusCode(200);