Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include the content property in the response returned by the 'wait for response' keyword to obtain the response body in byte format #3320

Open
masudparvez opened this issue Dec 11, 2023 · 2 comments
Labels
enhancement New feature or request priority: high

Comments

@masudparvez
Copy link

Is your feature request related to a problem? Please describe.
I aim to intercept a request that yields an image. Presently, the only available option is to retrieve text from the response. Unfortunately, converting this text to bytes is not effective, as it fails to handle certain characters.

Describe the solution you'd like
Providing the capability to collect the response in byte format would enable us to save the response as binary data.

Describe alternatives you've considered
Presently, I retrieve the response request, re-send it using the 'requests' library, and then utilize the 'content' property of the response to save it as binary data.

@aaltat
Copy link
Member

aaltat commented Dec 12, 2023

We should look can library know, is the transferred item a thing which should presented as bytes. If library can not know, then we should let user to decide should we return the payload as bytes or text.

@allcontributors please add @masudparvez for ideas.

Copy link
Contributor

@aaltat

I've put up a pull request to add @masudparvez! 🎉

@aaltat aaltat added enhancement New feature or request priority: high labels Dec 12, 2023
@aaltat aaltat modified the milestone: v18.2.0 Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority: high
Projects
None yet
Development

No branches or pull requests

2 participants