Sha256: c3445b7da8b35517106526b21cbaa610ba2a36ea927f3dc64eafb6ccee29e499
Contents?: true
Size: 710 Bytes
Versions: 7
Compression:
Stored size: 710 Bytes
Contents
WebAdminApp.get '/restclient' do log = get_logger log.call "WEB : restclient, verb : GET, controller : /restclient" get_menu 4 slim :restclient, :format => :html end WebAdminApp.post '/restclient/query' do log = get_logger log.call "WEB : processes, verb : GET, controller : /restclient/query" @method = params[:method] @url = params[:url] @body = params[:body] @notfound = false begin @result = RestClient::Request.execute(method: @method.to_sym, url: @url,timeout: 10, payload: @body) 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
7 entries across 7 versions & 1 rubygems