Sha256: 2aa9cd70ba383a962c3c77a3fd9c14465ec36066843b93e39c46b7538d0bc5df
Contents?: true
Size: 491 Bytes
Versions: 3
Compression:
Stored size: 491 Bytes
Contents
WebAdminApp.get '/restclient' do get_menu 4 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
3 entries across 3 versions & 1 rubygems