@@ -49,35 +49,22 @@ php artisan vendor:publish --provider="Http\Httplug\HttplugServiceProvider"
4949``` php
5050<?php
5151
52- use GuzzleHttp\Psr7\Request;
53-
54- /**
55- * Using the factory
56- */
52+ // Create a request using a MessageFactory
5753$factory = app()->make('httplug.message_factory.default');
5854$request = $factory->createRequest('GET', 'http://httpbin.org');
5955
6056$httplug = app()->make('httplug');
61- $request = new Request('GET', 'http://httpbin.org');
6257
63- /**
64- * Send request with default driver
65- * @var \Psr\Http\Message\ResponseInterface
66- */
58+ // Send request with default driver
6759$response = $httplug->sendRequest($request);
68- /**
69- * Send request with another driver
70- */
60+
61+ // Send request with another driver
7162$response = $httplug->driver('curl')->sendRequest($request);
7263
73- /**
74- * Send request with default driver using facade
75- * @var \Psr\Http\Message\ResponseInterface
76- */
64+ // Send request with default driver using facade
7765$response = Httplug::sendRequest($request);
78- /**
79- * Send request with another driver using facade
80- */
66+
67+ // Send request with another driver using facade
8168$response = Httplug::driver('curl')->sendRequest($request)
8269
8370```
@@ -88,7 +75,6 @@ $response = Httplug::driver('curl')->sendRequest($request)
8875$ composer test
8976```
9077
91-
9278## Contributing
9379
9480Please see our [ contributing guide] ( http://docs.php-http.org/en/latest/development/contributing.html ) .
0 commit comments