diff options
author | Loïc Hoguin <[email protected]> | 2017-04-27 15:23:57 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2017-04-27 15:23:57 +0200 |
commit | 32db544782f2528ed0916eecb200f75924dcc407 (patch) | |
tree | ef8746ab021a8172ac84e9f72062922ec4263619 /src/gun.erl | |
parent | e8c08c95b896bf9d2dd299e5fdbff50f714e8749 (diff) | |
download | gun-32db544782f2528ed0916eecb200f75924dcc407.tar.gz gun-32db544782f2528ed0916eecb200f75924dcc407.tar.bz2 gun-32db544782f2528ed0916eecb200f75924dcc407.zip |
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.
Diffstat (limited to 'src/gun.erl')
-rw-r--r-- | src/gun.erl | 4 |
1 files changed, 2 insertions, 2 deletions
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() |