Skip to content

Instantly share code, notes, and snippets.

@shime
Forked from DamirSvrtan/ZR
Created May 15, 2012 01:29
Show Gist options
  • Save shime/2698424 to your computer and use it in GitHub Desktop.
Save shime/2698424 to your computer and use it in GitHub Desktop.
ZR
require 'sinatra'
require 'rubygems'
require 'httparty'
require 'net/http'
require 'base64'
set :dump_errors, false
class Representative
include HTTParty
end
get '/' do
begin
@var = Representative.get('http://0.0.0.0:4569/')
erb :index
rescue Exception => msg
puts msg.message
erb :sheet # ili ovdje samo msg.message pa će ti ispisat error message u viewu samo
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment