From c8e05ad339971dd7a7b4af5fd745da48ae9e932c Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 31 Jul 2018 11:16:56 +0200 Subject: [PATCH] Update requests.md --- basics/requests.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/basics/requests.md b/basics/requests.md index 43c4d29..e925b34 100644 --- a/basics/requests.md +++ b/basics/requests.md @@ -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.