Skip to content

Rename Response::getBody() to Response::getContent() #363

Closed
@Art4

Description

@Art4

The method signatures in Redmine\Http\Response are defined with the intention that an implementing class can implement the Response interface and also the PSR-7 \Psr\Http\Message\ResponseInterface.

However the Response::getBody(): string is not compatible with ResponseInterface::getBody(): StreamInterface. So we should rename our method. Because Redmine\Http\Response was not released yet (see #357) renaming it will not be a breaking change.

I propose the signature Response::getContent(): string.

Refs #341

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions