Sha256: 582a716653636854eb56c119dd3cdc61d96112b1f8ffee00d88ffc5a72f4af04
Contents?: true
Size: 491 Bytes
Versions: 2
Compression:
Stored size: 491 Bytes
Contents
WebAdminApp.get '/restclient' do get_menu 3 slim :restclient, :format => :html end WebAdminApp.post '/restclient/query' do @method = params[:method] @url = params[:url] @notfound = false begin @result = RestClient::Request.execute(method: @method.to_sym, url: @url,timeout: 10) rescue SocketError @result = false rescue RestClient::NotFound => e @notfound = true @result = e.response end slim :restclient_result, :format => :html, :layout => false end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
prometheus-splash-0.6.1 | lib/splash/webadmin/portal/controllers/restclient.rb |
prometheus-splash-0.6.0 | lib/splash/webadmin/portal/controllers/restclient.rb |