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

Empty body for response with psr/http-message v2 #16

Open
Axent96 opened this issue Sep 9, 2024 · 1 comment
Open

Empty body for response with psr/http-message v2 #16

Axent96 opened this issue Sep 9, 2024 · 1 comment

Comments

@Axent96
Copy link

Axent96 commented Sep 9, 2024

"psr/http-message": "^2.0"

The src/Helper.php need to be updated
` if ($httpMessage instanceof ResponseInterface) {
$xmlString = (string)$httpMessage->getBody();

        $xmlString = simplexml_load_string($xmlString);
        return static::parseXmlElement($xmlString);
    }

to
if ($httpMessage instanceof ResponseInterface) {
$xmlString = $httpMessage->getBody()->getContents();

        $xmlString = simplexml_load_string($xmlString);
        return static::parseXmlElement($xmlString);
    }

`

@Axent96
Copy link
Author

Axent96 commented Sep 9, 2024

#17 Pull Request

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

No branches or pull requests

1 participant