Skip to content

Request setBody not working #332

Description

@byazrail

Hi,

	$this->response->setHeader('Content-type', 'application/json');
	$this->response->setStatusCode(200)
	               ->setBody(json_encode($json));

Only variables should be passed by reference // ->setBody(json_encode($json));

Working;
$this->response->setHeader('Content-type', 'application/json');
echo json_encode($json);

Message Class not extended, HTTP\Response.

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