From 32db544782f2528ed0916eecb200f75924dcc407 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 27 Apr 2017 15:23:57 +0200 Subject: Add content handlers and built-in SSE support Content handlers are a chain of modules implementing callbacks that receive the body of responses and may modify it (for example for decompressing the content) or act upon it (like sending a message to the owner process. The gun_sse content handler module can be used to translate text/event-stream events on the fly and deliver them to the owner process as a {gun_sse...} message. This feature is currently not documented and is only tested against a public server. It requires an up to date Cowlib. --- src/gun.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gun.erl') diff --git a/src/gun.erl b/src/gun.erl index eeaaa1e..3edc698 100644 --- a/src/gun.erl +++ b/src/gun.erl @@ -102,8 +102,8 @@ host :: inet:hostname(), port :: inet:port_number(), opts :: opts(), - keepalive_ref :: reference(), - socket :: inet:socket() | ssl:sslsocket(), + keepalive_ref :: undefined | reference(), + socket :: undefined | inet:socket() | ssl:sslsocket(), transport :: module(), protocol :: module(), protocol_state :: any() -- cgit v1.2.3