Skip to content

Instantly share code, notes, and snippets.

@posulliv
Last active December 15, 2015 19:59
Show Gist options
  • Save posulliv/5314892 to your computer and use it in GitHub Desktop.
Save posulliv/5314892 to your computer and use it in GitHub Desktop.
simple PHP example
<?php
require_once 'vendor/autoload.php';
use Guzzle\Http\Client;
use Guzzle\Service\Description\ServiceDescription;
$client = new Client('http://localhost:8091/');
$response = $client->get('/v1/version')->send();
echo $response->getBody();
$sql = 'select table_name from information_schema.tables';
$response = $client->get('/v1/sql/query?q=' . $sql)->send();
echo $response->getBody();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment