Skip to content

Commit 0107031

Browse files
authored
Copy over changelogs from fern repo (#210)
1 parent 1e93bd4 commit 0107031

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
## 2.1.3
2+
**`(fix):`** uses fully qualified class name `System.IO.Stream` for downloads
3+
4+
## 2.1.2
5+
**`(feat):`** Generate methods to support FileDownload (returns a `Task<Stream>`).
6+
Example:
7+
8+
```csharp
9+
var request = new FooAudioRequest {
10+
Format = Format.Wav,
11+
Song = "Happy Birthday"
12+
};
13+
var stream = await client.Songs.CreateSongAsync(request);
14+
// copy the stream to a file
15+
using (var fileStream = new FileStream("song.wav", FileMode.Create, FileAccess.Write))
16+
{
17+
await stream.CopyToAsync(fileStream);
18+
}
19+
```
20+
21+
22+
**`(feat):`** Generate streaming/SSE JSON responses (returns an `IAsyncEnumerable<...>`).
23+
Example:
24+
25+
```csharp
26+
var request = new FooRequest
27+
{
28+
Names = ["Bob", "Alice"]
29+
};
30+
31+
// iterate over the list of items returned
32+
await foreach( var item in client.People.CreatePeopleStreamingAsync(request)) {
33+
Console.WriteLine($"Text for {item.Name} : {item.Text}");
34+
}
35+
```
36+
37+

0 commit comments

Comments
 (0)