Method GetEventStream
GetEventStream()
Asynchronously gets an event stream writer with UTF-8 encoding.
public HttpEventStreamWriter GetEventStream()
Returns
- HttpEventStreamWriter
A task that represents the asynchronous operation, with a HttpEventStreamWriter as the result.
GetEventStream(Encoding)
Asynchronously gets an event stream writer with the specified encoding.
public HttpEventStreamWriter GetEventStream(Encoding encoding)
Parameters
encoding
EncodingThe encoding to use for the event stream.
Returns
- HttpEventStreamWriter
A task that represents the asynchronous operation, with a HttpEventStreamWriter as the result.
Exceptions
- InvalidOperationException
Thrown when unable to obtain an output stream for the response.