Conversation
Add --stream option to enable streaming response body output as it arrives. - Add StreamOption to RequestExecutor - Implement InvokeStreamingRequest method for streaming responses - Change HttpResponseModel.Bytes from init to set to support streaming - Add IsStreamingMode flag to track streaming state - Skip normal output formatting when in streaming mode - Add unit tests for streaming option recognition Co-authored-by: WeihanLi <7604648+WeihanLi@users.noreply.github.com>
Add StreamingCompleted flag to track when streaming actually occurred. Only skip normal output formatting when streaming was actually performed, not just when the streaming option was present. Co-authored-by: WeihanLi <7604648+WeihanLi@users.noreply.github.com>
- Use response encoding from Content-Type header instead of hardcoded UTF-8 - Improve error handling in catch block with logging - Add documentation comment for IsTextResponse behavior Co-authored-by: WeihanLi <7604648+WeihanLi@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Stream http response output
Add --stream option to output HTTP response body as it arrives
Nov 3, 2025
WeihanLi
reviewed
Nov 3, 2025
WeihanLi
approved these changes
Nov 7, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements streaming response output for better UX with long-running requests and streaming APIs. Currently, all responses are buffered until complete before any output is shown.
Changes
Command-line interface:
--stream/-Soption to enable streaming mode--downloadflagCore implementation:
RequestExecutor.InvokeStreamingRequest(): UsesHttpCompletionOption.ResponseHeadersReadto start receiving data immediatelyHttpResponseModel.Bytes: Changed frominittosetto support incremental updatesState tracking:
IsStreamingModeflag set when--streamoption presentStreamingCompletedflag set after successful streaming to skip normal output formattingUsage
Binary responses and downloads automatically use buffered mode regardless of flag.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
httpbin.org/home/REDACTED/work/dotnet-httpie/dotnet-httpie/tests/HTTPie.IntegrationTest/bin/Debug/net10.0/HTTPie.IntegrationTest --internal-msbuild-node /home/REDACTED/.local/share/eb0b5e397f8d46c597913dcb38a813f7/.p(dns block)/home/REDACTED/work/dotnet-httpie/dotnet-httpie/src/HTTPie/bin/Debug/net10.0/dotnet-httpie GET REDACTED --stream(dns block)/home/REDACTED/work/dotnet-httpie/dotnet-httpie/tests/HTTPie.IntegrationTest/bin/Debug/net10.0/HTTPie.IntegrationTest --internal-msbuild-node /home/REDACTED/.local/share/d5029fa786974acbb89a522699550d97/.p(dns block)reservation.weihanli.xyz/home/REDACTED/work/dotnet-httpie/dotnet-httpie/tests/HTTPie.IntegrationTest/bin/Debug/net10.0/HTTPie.IntegrationTest --internal-msbuild-node /home/REDACTED/.local/share/eb0b5e397f8d46c597913dcb38a813f7/.p(dns block)/home/REDACTED/work/dotnet-httpie/dotnet-httpie/tests/HTTPie.IntegrationTest/bin/Debug/net10.0/HTTPie.IntegrationTest --internal-msbuild-node /home/REDACTED/.local/share/d5029fa786974acbb89a522699550d97/.p(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Note
Custom agent used: dotnet expert
Build amazing things in C#
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.