Sha256: 9902de8aba9ca8e68ef8e624d619592bffbf9c9610cd0ddbed5f8af8fb3fed8f
Contents?: true
Size: 610 Bytes
Versions: 2
Compression:
Stored size: 610 Bytes
Contents
#!/usr/local/bin/ruby #################################### # Echos back the HTTP header and parameters as YAML. # # Copyright (c) 2008, Regents of the University of Colorado # Developer: Simon Chiang, Biomolecular Structure Program # Homepage: http://hsc-proteomics.ucdenver.edu/hansen_lab # #################################### require 'cgi' require 'tap/http/utils' cgi = CGI.new cgi.out("text/plain") do begin request = Tap::Http::Utils.parse_cgi_request(cgi) request[:headers].to_yaml + request[:params].to_yaml rescue "Error: #{$!.message}\n" + $!.backtrace.join("\n") end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tap-http-0.2.1 | cgi/echo.rb |
tap-http-0.2.0 | cgi/echo.rb |