|
@@ -6,6 +6,9 @@ ixudra/curl
|
|
|
[](https://styleci.io/repos/18486198)
|
|
|
[](https://packagist.org/packages/ixudra/curl)
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
Custom PHP cURL library for the Laravel 4 or 5 framework - developed by [Ixudra](http://ixudra.be).
|
|
|
|
|
|
The package provides an easy interface for sending cURL requests from your PHP web application. The package provides an
|
|
@@ -298,6 +301,21 @@ Alternatively, you can use the `withHeaders()` to combine multiple headers into
|
|
|
|
|
|
```
|
|
|
|
|
|
+You can also use key-value when using the `withHeaders()` method:
|
|
|
+
|
|
|
+```php
|
|
|
+
|
|
|
+ use Ixudra\Curl\Facades\Curl;
|
|
|
+
|
|
|
+ // Send a GET request to: http://www.foo.com/bar with 2 custom headers
|
|
|
+ $response = Curl::to('http://foo.com/bar')
|
|
|
+ ->withHeaders( array( 'MyFirstHeader' => '123', 'MySecondHeader' => '456' ) )
|
|
|
+ ->get();
|
|
|
+
|
|
|
+```
|
|
|
+
|
|
|
+ > Note that headers will override each other if you add the same header more than once.
|
|
|
+
|
|
|
|
|
|
### Specifying the content type
|
|
|
|