diff options
author | theres <dmarkiew@CNU3429M9W.nsn-intra.net> | 2014-07-15 09:44:07 +0200 |
---|---|---|
committer | theres <dmarkiew@CNU3429M9W.nsn-intra.net> | 2014-07-15 09:44:07 +0200 |
commit | 090e64bd20a40ed55c79025e611ba2c6a45c80df (patch) | |
tree | b9a284b086b69e057386e11333d7ff15a130834d /src/PurpleCode/PCurl/PCurlResponse.php | |
parent | 1884e50d534f9ca82527d06861cb7064fe1d9b40 (diff) | |
download | php.curl-090e64bd20a40ed55c79025e611ba2c6a45c80df.zip php.curl-090e64bd20a40ed55c79025e611ba2c6a45c80df.tar.gz php.curl-090e64bd20a40ed55c79025e611ba2c6a45c80df.tar.bz2 |
PCurl will now return PCurlResponse object instead of raw body. PJsonCurl
also, but will try to parse JSON and throw an exception when fail to
parse.
Diffstat (limited to 'src/PurpleCode/PCurl/PCurlResponse.php')
-rw-r--r-- | src/PurpleCode/PCurl/PCurlResponse.php | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/PurpleCode/PCurl/PCurlResponse.php b/src/PurpleCode/PCurl/PCurlResponse.php new file mode 100644 index 0000000..d616a95 --- /dev/null +++ b/src/PurpleCode/PCurl/PCurlResponse.php @@ -0,0 +1,39 @@ +<?php + +/** + * PCurl is a REST client libary for PHP. + * + * See http://github.com/purplecode/php.curl for details. + * + * This code is licensed for use, modification, and distribution + * under the terms of the MIT License (see http://en.wikipedia.org/wiki/MIT_License) + */ + +namespace PurpleCode\PCurl; + + +class PCurlResponse { + private $body; + private $header; + + public function __construct($header, $body){ + $this->header = $header; + $this->body = $body; + } + + public function setBody($body){ + $this->body = $body; + } + + public function getBody(){ + return $this->body; + } + + public function setHeader($header){ + $this->header = $header; + } + + public function getHeader(){ + return $this->header; + } +} |