View Source Tesla.Middleware.SSE (tesla v1.13.2)
Decode Server Sent Events.
This middleware is mostly useful when streaming response body.
Examples
defmodule MyClient do
def client do
Tesla.client([Tesla.Middleware.SSE, only: :data])
end
end
Options
:only
- keep only specified keys in event (necessary for using withJSON
middleware):decode_content_types
- list of additional decodable content-types