Skip to content

Instantly share code, notes, and snippets.

@mschwartz
Created February 11, 2012 15:14
Show Gist options
  • Save mschwartz/1800620 to your computer and use it in GitHub Desktop.
Save mschwartz/1800620 to your computer and use it in GitHub Desktop.
// ctest.coffee
res.write '<pre>'
res.write 'hello, world\n'
res.write Util.print_r req
outputs in the browser:
hello, world
(object) :
[init] : (function)
[getHeader] : (function)
[close] : (function)
[start] : (number) 1328970431640
[headers] : (object) :
[host] : (string) localhost:9090
[connection] : (string) keep-alive
[cache-control] : (string) max-age=0
[user-agent] : (string) Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7
[accept] : (string) text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
[accept-encoding] : (string) gzip,deflate,sdch
[accept-language] : (string) en-US,en;q=0.8
[accept-charset] : (string) ISO-8859-1,utf-8;q=0.7,*;q=0.3
[cookie] : (string) othello_login=c631bf96511b78a85db73b8682731e44
[] : (string) (empty)
[apply] : (function)
[dump] : (function)
[host] : (string) localhost
[port] : (string) 9090
[method] : (string) GET
[uri] : (string) /ctest.coffee
[proto] : (string) HTTP/1.1
[remote_addr] : (string) 127.0.0.1
[data] : (object) :
[apply] : (function)
[dump] : (function)
[path] : (string) /home/mschwartz/src/SilkJS/httpd/docroot/ctest.coffee
[apply] : (function)
[dump] : (function)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment