Advertisement
pellekrogholt

Untitled

Feb 11th, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         aRequest on: 'end' do: [           
  2.             body := 'hello from server i got the event\n'.
  3.             headers := Dictionary new.
  4.             headers
  5.                 at: 'Content-Type'
  6.                 put: 'text/html'.
  7.             headers
  8.                 at: 'Content-Length'
  9.                 put: body size.
  10.             aResponse writeHead: (Array with: 200 with: headers).
  11.             Transcript show: aResponse; cr.
  12.             "python urllib2 did not like the next line: http://pastebin.com/qx0M7ads"
  13.             aResponse end: body.
  14.         ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement