Skip to content

Instantly share code, notes, and snippets.

@engintekin
engintekin / Application.java
Created October 26, 2011 20:02
Gzip your response in Play framework
@With(Compress.class)
public class Application extends Controller {
public static void index() {
render();//response will be gzipped
}
}
@engintekin
engintekin / CustomerIOAdapter.java
Created March 1, 2015 07:04
customer.io java adapter
public class CustomerIOAdapter
{
private static final String CUSTOMER_IO_SITE_ID = "site-id";
private static final String CUSTOMER_IO_API_KEY = "api-key";
public void sendEvent(String id, String eventName, Map<String, Object> map) throws IOException
{
HttpPost request = new HttpPost("/api/v1/customers/" + id + "/events");