Skip to content

[4.0] Change access to body of Response object #62

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

Merged
merged 2 commits into from
Aug 6, 2025

Conversation

Hackwar
Copy link
Contributor

@Hackwar Hackwar commented Aug 3, 2025

Summary of Changes

When converting the code to v4 of the Joomla HTTP package, the method Response->getBody()->getContents() was used to access the body of the response, which can be problematic, when the pointer of the internal stream is not set to the beginning. This PR changes the code to use the magic __toString() method of the StreamInterface instead.

Testing Instructions

Codereview

Documentation Changes Required

none

@Hackwar Hackwar merged commit 7e0d6fd into joomla-framework:4.x-dev Aug 6, 2025
6 checks passed
@Hackwar Hackwar deleted the 4.x-http branch August 6, 2025 10:10
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.

2 participants