Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from romainneutron/guzzle6-compat
Update SDK for Guzzle 6
- Loading branch information
Showing
4 changed files
with
71 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace SensioLabs\Consul; | ||
|
||
class ConsulResponse | ||
{ | ||
private $headers; | ||
private $body; | ||
|
||
public function __construct($headers, $body) | ||
{ | ||
$this->headers = $headers; | ||
$this->body = $body; | ||
} | ||
|
||
public function getHeaders() | ||
{ | ||
return $this->headers; | ||
} | ||
|
||
public function getBody() | ||
{ | ||
return $this->body; | ||
} | ||
|
||
public function json() | ||
{ | ||
return json_decode($this->body, true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters