how can I make an HTTP request and get both the response content and the response headers?
+4
A:
Probably the easiest is if you load WebClient
from http://www.squeaksource.com/WebClient.
Lukas Renggli
2010-08-23 06:05:08
WebClient has actual, useful documentation too!
Frank Shearar
2010-08-23 07:45:13
A:
Stephan Eggermont
2010-08-24 19:10:41
+1
A:
To install WebClient:
(Installer ss project: 'WebClient')
install: 'WebClient-Core'
and then
response := WebClient httpGet: 'http://www.google.com/'.
headers := response headers. "An OrderedCollection of headername -> headervalue"
body := response content.
Frank Shearar
2010-08-26 12:38:23