Skip to content

HTTP stream enhancements - #6077

Merged
sid-bruno merged 34 commits into
usebruno:feature/http-stream-internalfrom
barelyhuman:feat/http-stream-enhancements
Nov 14, 2025
Merged

sid-bruno merged 34 commits into
usebruno:feature/http-stream-internalfrom
barelyhuman:feat/http-stream-enhancements

Conversation

@barelyhuman

Copy link
Copy Markdown
Contributor

Description

Extends the orginal PR with any needed improvements

Contribution Checklist:

  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.

@sid-bruno
sid-bruno marked this pull request as ready for review November 13, 2025 13:06
Copilot AI review requested due to automatic review settings November 13, 2025 13:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adds HTTP streaming support to Bruno, enabling real-time handling of Server-Sent Events (SSE) and other streaming HTTP responses. The implementation includes stream detection, data buffering, UI components for displaying streaming status and data, and proper lifecycle management for streaming connections.

  • Stream detection via text/event-stream content-type header and conditional response handling
  • Real-time stream data display with hexdump visualization and connection lifecycle tracking
  • UI enhancements including a stopwatch timer for active streams and visual streaming indicators

Reviewed Changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
packages/bruno-electron/src/ipc/network/index.js Core streaming logic: adds stream detection, promisification helper, response type handling, deferred post-script execution for streams, and collection runner stream support
packages/bruno-app/src/utils/network/index.js Propagates stream information from backend to frontend response objects
packages/bruno-app/src/providers/ReduxStore/slices/collections/index.js Stream state management: handles stream data reception, cancellation with duration calculation, and prevents response clearing for active streams
packages/bruno-app/src/providers/App/useIpcEvents.js Registers IPC event listeners for stream data updates and stream end events
packages/bruno-app/src/components/ResponsePane/index.js Conditionally renders stream message list for streaming responses and adds stopwatch component
packages/bruno-app/src/components/ResponsePane/WsResponsePane/WSMessagesList/index.js Adds proper key prop using timestamp to prevent React warnings
packages/bruno-app/src/components/ResponsePane/StatusCode/index.js Displays "STREAMING" indicator for active stream responses
packages/bruno-app/src/components/ResponsePane/ResponseStopWatch/index.js New component providing real-time duration display for active streams
packages/bruno-app/src/components/ResponsePane/ResponseStopWatch/StyledWrapper.js Styled wrapper for stopwatch component
packages/bruno-app/src/components/ResponsePane/ResponseBookmark/index.js Disables bookmark functionality for streaming responses
packages/bruno-app/src/components/RequestTabPanel/index.js Enables request cancellation when stream is active
packages/bruno-app/src/components/RequestPane/QueryUrl/index.js Shows cancel button for active streams
packages/bruno-app/package.json Adds hexy dependency for hexdump visualization
package-lock.json Lock file update for hexy dependency
Comments suppressed due to low confidence (4)

packages/bruno-app/src/components/ResponsePane/ResponseBookmark/index.js:16

  if (!isStreamingResponse && !isStreamingResponse) {

packages/bruno-app/src/components/RequestPane/QueryUrl/index.js:8

  • Unused import IconX.
import { IconDeviceFloppy, IconArrowRight, IconCode, IconX, IconSquareRoundedX } from '@tabler/icons';

packages/bruno-app/src/components/ResponsePane/ResponseBookmark/index.js:16

  • This negation always evaluates to true.
  if (!isStreamingResponse && !isStreamingResponse) {

packages/bruno-app/src/components/ResponsePane/ResponseBookmark/index.js:19

  • This use of variable 'isStreamingResponse' always evaluates to true.
  if (isStreamingResponse) {

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Cleaned up formatting and improved readability of the post-response script execution logic.
- Consolidated parameters in function calls for consistency.
@sid-bruno
sid-bruno changed the base branch from main to feature/http-stream-internal November 14, 2025 11:17
@sid-bruno
sid-bruno merged commit efad149 into usebruno:feature/http-stream-internal Nov 14, 2025
maxenceleblanc pushed a commit to maxenceleblanc/curly_cats2 that referenced this pull request Jul 20, 2026
* feat: add stop request button in api url bar

* docs: add farsi translation

* fix: handle escaped forward slashes by fast-json-format library upgrade

* refactor: change ui to use one from Websockets

* chore: cleanup

* fix: lint issues

* Replace IconPlayerStop with IconSquareRoundedX

* update json request and response formatting logic

* chore: format changes

* chore: remove un-needed diffs

* chore: sanitize

* bugfix(usebruno#5939): curl import fails for custom content-types

* chore: remove un-needed diffs

* chore: enhance response handling for streaming

* fix: disable requestid check for tests and assertions to be updated after streaming result

* chore: housekeeping

* fix: streamline loading and cancel request icon logic

* chore: formatting

* fix: multiple co-pilot changes

* fix: handle in folders

* feat: add WaitGroup utility for managing concurrent tasks

* refactor: remove WaitGroup utility and clean up network IPC logic

* refactor: remove unused setTimeout import and clean up post script execution

* refactor: clean up post-response script execution logic

* undiff

* re-align

* refactor: streamline post-response script execution

- Cleaned up formatting and improved readability of the post-response script execution logic.
- Consolidated parameters in function calls for consistency.

* fix: keep original dataBuffer for saving response

---------

Co-authored-by: adarshajit <[email protected]>
Co-authored-by: sajadoncode <[email protected]>
Co-authored-by: lohit-bruno <[email protected]>
Co-authored-by: Bijin A B <[email protected]>
Co-authored-by: Pragadesh-45 <[email protected]>
Co-authored-by: Anoop M D <[email protected]>
Co-authored-by: Anoop M D <[email protected]>
Co-authored-by: Dawid Góra <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants