Skip to content

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

Open
@Axent96

Description

@Axent96

"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);
    }

`

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions