Skip to content

Commit d7e8c74

Browse files
committed
Add getters for Response properties
1 parent 7dc31f6 commit d7e8c74

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

src/WaterPipe/HTTP/Response/Response.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,4 +241,34 @@ public function setHeader(ResponseHeader $header): self
241241

242242
return $this;
243243
}
244+
245+
/**
246+
* Get the response body.
247+
*
248+
* @return string
249+
*/
250+
public function getBody(): string
251+
{
252+
return $this->_body;
253+
}
254+
255+
/**
256+
* Get the response status.
257+
*
258+
* @return ResponseStatus
259+
*/
260+
public function getStatus(): ResponseStatus
261+
{
262+
return $this->_status;
263+
}
264+
265+
/**
266+
* Get the response header.
267+
*
268+
* @return ResponseHeader
269+
*/
270+
public function getHeader(): ResponseHeader
271+
{
272+
return $this->_header;
273+
}
244274
}

0 commit comments

Comments
 (0)