Update requests.md

This commit is contained in:
Dennis Eichhorn 2018-07-31 11:16:56 +02:00 committed by GitHub
parent 059248ca28
commit c8e05ad339
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,14 @@ With the rest implementation it's possible to make http requests and read the re
```php
$request = new Request(new Http('http://your_request.com/url?to=call'));
$result = Rest::request($request);
$result = Rest::request($request);
```
Alternatively it's also possible to make a rest request directly from the Http request object.
```php
$request = new Request(new Http('http://your_request.com/url?to=call'));
$result = $request->rest();
```
The result contains the raw response text. By defining the request method it's also possible to make other requests such as `PUT` requests.