Skip to content

Add streaming response support #30

Description

@tw4

Summary

Nexar does not support streaming HTTP responses. This limits its use in scenarios like downloading large files, reading Server-Sent Events (SSE), or consuming chunked transfer responses.

Use Cases

  • Downloading large files without loading the entire body into memory
  • Consuming SSE streams (e.g., AI model token streaming)
  • Real-time data feeds with chunked transfer encoding

Proposed Solution

Add dedicated streaming methods that return a Stream or expose an IAsyncEnumerable<string> for line-by-line reading.

// Stream download
await using var stream = await Nexar.GetStreamAsync(url);

// SSE / line-by-line
await foreach (var line in Nexar.GetLinesAsync(url))
{
    Console.WriteLine(line);
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions