Skip to content

Commit

Permalink
Merge pull request #7 from Nekland/feature/allow-string-body
Browse files Browse the repository at this point in the history
Feature/allow string body
  • Loading branch information
Nek- committed Mar 19, 2015
2 parents da95ad6 + 4c2e9d5 commit d74a108
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/Nekland/BaseApi/Api/AbstractApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ public function setTransformer(TransformerInterface $transformer)
/**
* Execute a http get query
*
* @param string $path
* @param array $body
* @param array $headers
* @param string $path
* @param array|string $body
* @param array $headers
* @return array|mixed
*/
protected function get($path, array $body = [], array $headers = [])
protected function get($path, $body = [], array $headers = [])
{
$client = $this->getClient();
$request = $client::createRequest('GET', $path, $body, $headers);
$request = AbstractHttpClient::createRequest('GET', $path, $body, $headers);

return $this->transformer->transform($client->send($request));
}
Expand All @@ -73,7 +73,7 @@ protected function get($path, array $body = [], array $headers = [])
protected function put($path, $body = [], array $headers = [])
{
$client = $this->getClient();
$request = $client::createRequest('PUT', $path, $body, $headers);
$request = AbstractHttpClient::createRequest('PUT', $path, $body, $headers);

return $this->transformer->transform($client->send($request));
}
Expand All @@ -89,7 +89,7 @@ protected function put($path, $body = [], array $headers = [])
protected function post($path, $body = [], array $headers = [])
{
$client = $this->getClient();
$request = $client::createRequest('POST', $path, $body, $headers);
$request = AbstractHttpClient::createRequest('POST', $path, $body, $headers);

return $this->transformer->transform($client->send($request));
}
Expand All @@ -105,7 +105,7 @@ protected function post($path, $body = [], array $headers = [])
protected function delete($path, $body = [], array $headers = [])
{
$client = $this->getClient();
$request = $client::createRequest('DELETE', $path, $body, $headers);
$request = AbstractHttpClient::createRequest('DELETE', $path, $body, $headers);

return $this->transformer->transform($client->send($request));
}
Expand Down

0 comments on commit d74a108

Please sign in to comment.