C#C
C#3y ago
Vortac

✅ Streaming From REST API?

I'm building an SDK to interface with a REST API, and for one of then endpoints you can supply a boolean to specify if you want streaming or not. In particular, it mentions:

//  Default: false
// Whether to stream back partial progress. If set, tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.


I'm just wondering, do I use HTTPClient for this? Or is there another way to handle streams?
Was this page helpful?