Commit a6018508 authored by TheBigB's avatar TheBigB
Browse files

Merge branch 'release/0.2.8'

parents 9ff7ca4a 5608eec0
......@@ -12,6 +12,7 @@ namespace OneOfZero\Curly;
use OneOfZero\Curly\Handlers\AbstractHandler;
use OneOfZero\Streams\SharedStreamInterface;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\StreamInterface;
use Zend\Diactoros\Request;
use Zend\Diactoros\Response;
......@@ -24,7 +25,7 @@ use Zend\Diactoros\Stream;
*
* @package OneOfZero\Curly
*/
class Curly
class Curly implements HttpClientInterface
{
/**
* Holds the cURL options relevant to this instance.
......@@ -58,7 +59,7 @@ class Curly
* @param string $url
* @param string $method
*
* @return Response
* @return ResponseInterface
*/
public function requestByUrl($url, $method = 'GET')
{
......@@ -72,7 +73,7 @@ class Curly
*
* @param RequestInterface $request
*
* @return Response
* @return ResponseInterface
*/
public function request(RequestInterface $request)
{
......
<?php
/**
* Copyright (c) 2015 Bernardo van der Wal
* MIT License
*
* Refer to the LICENSE file for the full copyright notice.
*/
namespace OneOfZero\Curly;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
interface HttpClientInterface
{
/**
* Executes a request with the provided URL and method.
*
* Returns a PSR-7 response object.
*
* @param string $url
* @param string $method
*
* @return ResponseInterface
*/
public function requestByUrl($url, $method = 'GET');
/**
* Executes a request with the provided PSR-7 request object.
*
* Returns a PSR-7 response object.
*
* @param RequestInterface $request
*
* @return ResponseInterface
*/
public function request(RequestInterface $request);
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment