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
endOptions
:only- keep only specified keys in event (necessary for using withJSONmiddleware):decode_content_types- list of additional decodable content-types