Skip to content

Conversation

@climba03003
Copy link
Member

Provide Readable response through response.stream()

Closes #283

Checklist

Provide `Readable` response through `response.stream()`
Copy link
Contributor

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

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

I wanted to expose the chunks itself, but your solution is superior.

LGTM

@Uzlopak Uzlopak requested a review from Fdawgs March 18, 2024 11:32
Signed-off-by: Frazer Smith <[email protected]>
Copy link
Member

@gurgunday gurgunday left a comment

Choose a reason for hiding this comment

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

lgtm

@Fdawgs
Copy link
Member

Fdawgs commented Mar 18, 2024

This is fantastic @climba03003, thanks!

@Uzlopak Uzlopak merged commit 87efe4f into master Mar 18, 2024
@Fdawgs Fdawgs deleted the res-stream branch March 18, 2024 13:29
@alphaone
Copy link

alphaone commented May 6, 2024

Nice.

I have two questions:

  • is this released yet?
  • how to use this in a async/await context using a inject chain?

@climba03003
Copy link
Member Author

climba03003 commented May 6, 2024

is this released yet?

In version 5.13.0

how to use this in a async/await context using a inject chain?

const response = await inject(dispatch, {
  method: 'GET',
  path: '/'
})
const readable = response.stream()

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Testing a streamed response using light-my-request?

6 participants