Created
May 12, 2014 20:23
-
-
Save laser/cd202f31bb72cb2c7c97 to your computer and use it in GitHub Desktop.
Basic Client - Ruby
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'barrister' | |
trans = Barrister::HttpTransport.new("http://localhost:3000/v1/todos") | |
client = Barrister::Client.new(trans) | |
begin | |
result = client.TodoManager.createTodo({ 'title' => 'Call Mom', 'completed' => false }) | |
puts result | |
rescue Barrister::RpcException => e | |
puts "err.code=#{e.code}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment