Skip to content

Instantly share code, notes, and snippets.

@laser laser/client.php
Last active Aug 29, 2015

What would you like to do?
Basic Client - PHP
#!/usr/bin/env php
$barrister = new Barrister();
$client = $barrister->httpClient("http://localhost:3000/v1/todos");
$proxy = $client->proxy("TodoManager");
try {
$result = $proxy->createTodo([ "title" => "Call Mom", "completed" => false ]);
catch (BarristerRpcException $e) {
echo "err.code=" . $e->getCode() . "\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.