Comment on page
Making a request
$api = new Http('https://example.com/api/');
If you need to setup any See authentication
an available Data class. RestApi supports things like get and post, GraphQL has a query method. Full details on available methods appear below.
$response = $api->get('posts');
HTTP requests only run once you access data. For example:
$item = $response->getContents();
At this point the HTTP request is made and if an error occurs an exception is thrown.