@@ -49,35 +49,22 @@ php artisan vendor:publish --provider="Http\Httplug\HttplugServiceProvider"
49
49
``` php
50
50
<?php
51
51
52
- use GuzzleHttp\Psr7\Request;
53
-
54
- /**
55
- * Using the factory
56
- */
52
+ // Create a request using a MessageFactory
57
53
$factory = app()->make('httplug.message_factory.default');
58
54
$request = $factory->createRequest('GET', 'http://httpbin.org');
59
55
60
56
$httplug = app()->make('httplug');
61
- $request = new Request('GET', 'http://httpbin.org');
62
57
63
- /**
64
- * Send request with default driver
65
- * @var \Psr\Http\Message\ResponseInterface
66
- */
58
+ // Send request with default driver
67
59
$response = $httplug->sendRequest($request);
68
- /**
69
- * Send request with another driver
70
- */
60
+
61
+ // Send request with another driver
71
62
$response = $httplug->driver('curl')->sendRequest($request);
72
63
73
- /**
74
- * Send request with default driver using facade
75
- * @var \Psr\Http\Message\ResponseInterface
76
- */
64
+ // Send request with default driver using facade
77
65
$response = Httplug::sendRequest($request);
78
- /**
79
- * Send request with another driver using facade
80
- */
66
+
67
+ // Send request with another driver using facade
81
68
$response = Httplug::driver('curl')->sendRequest($request)
82
69
83
70
```
@@ -88,7 +75,6 @@ $response = Httplug::driver('curl')->sendRequest($request)
88
75
$ composer test
89
76
```
90
77
91
-
92
78
## Contributing
93
79
94
80
Please see our [ contributing guide] ( http://docs.php-http.org/en/latest/development/contributing.html ) .
0 commit comments