update notice api:2.2

This commit is contained in:
xdrm-brackets 2016-12-12 14:16:03 +01:00
parent 32afb19c82
commit c77b52d7ca
1 changed files with 1 additions and 4 deletions

View File

@ -193,11 +193,8 @@ In order to setup an automatic bound from HTTP requests to API directly, you mus
// create request from HTTP data // create request from HTTP data
$request = Request::remote($url); $request = Request::remote($url);
// manage request error
if( $request->error->get() !== Err::Success )
die('request error');
// execute request and catch response // execute request and catch response
// note that request errors will propagate through response
$response = $request->dispatch(); $response = $request->dispatch();
// return response as HTTP body // return response as HTTP body