Skip to content

Commit

Permalink
Add parameterless constructor to StreamResponse (#111)
Browse files Browse the repository at this point in the history
This is required to fulfill the `new()` constraint on e.g.
`ResponseBuilder.ToResponse()`.
  • Loading branch information
flobernd committed Aug 7, 2024
1 parent dad28b3 commit b65498c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Elastic.Transport/Responses/Special/StreamResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ public sealed class StreamResponse :
/// </summary>
public string MimeType { get; }

/// <inheritdoc cref="StreamResponse"/>
public StreamResponse()
{
Body = Stream.Null;
MimeType = string.Empty;
}

/// <inheritdoc cref="StreamResponse"/>
public StreamResponse(Stream body, string? mimeType)
{
Expand Down

0 comments on commit b65498c

Please sign in to comment.