diff --git a/src/HttpClient.php b/src/HttpClient.php index d6a9737..d25e2dd 100644 --- a/src/HttpClient.php +++ b/src/HttpClient.php @@ -2,6 +2,7 @@ namespace Ivan770\HttpClient; +use Illuminate\Contracts\Support\Arrayable; use Illuminate\Support\Traits\Macroable; use Ivan770\HttpClient\Response\Response; use Ivan770\HttpClient\Traits\InteractsWithEloquent; @@ -19,6 +20,7 @@ * @method HttpClient query(array $query) Add query string values to request * @method HttpClient withoutRedirects() Ignore all redirects for this request * @method HttpClient proxy(string $proxy, string $noproxy) Change proxy for this request + * @method HttpClient parse(Arrayable $arrayable) Parse Arrayable class as JSON data source * @method Response get(string $url, array $arguments = []) Send a GET request * @method Response head(string $url, array $arguments = []) Send a HEAD request * @method Response post(string $url, array $arguments = []) Send a POST request diff --git a/src/Request/Request.php b/src/Request/Request.php index 6db3bf8..e4acf23 100644 --- a/src/Request/Request.php +++ b/src/Request/Request.php @@ -3,11 +3,11 @@ namespace Ivan770\HttpClient\Request; +use Illuminate\Contracts\Support\Arrayable; use Illuminate\Support\Collection; use Ivan770\HttpClient\Contracts\PassToBrowserKit; use Ivan770\HttpClient\Contracts\Request as RequestContract; use Ivan770\HttpClient\HttpClient; -use Ivan770\HttpClient\Response\Response; use Symfony\Component\BrowserKit\CookieJar; use Symfony\Component\BrowserKit\History; use Symfony\Component\DomCrawler\Crawler; @@ -22,6 +22,7 @@ * @method RequestContract query(array $query) Add query string values to request * @method RequestContract withoutRedirects() Ignore all redirects for this request * @method RequestContract proxy(string $proxy, string $noproxy) Change proxy for this request + * @method RequestContract parse(Arrayable $arrayable) Parse Arrayable class as JSON data source * * @see Builder */