[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: am I stupid? I crashed my Mac 10 times with 9 lines of code.
- To: comp-lang-lisp-mcl@services.cambridge.apple.com
- Subject: Re: am I stupid? I crashed my Mac 10 times with 9 lines of code.
- From: poeck@informatik.uni-wuerzburg.de (Karsten Poeck)
- Date: 25 Aug 1994 14:53:05 GMT
- Distribution: world
- Newsgroups: comp.lang.lisp.mcl
- Organization: University of Wuerzburg
- References: <PHILG.94Aug18131743@camelot.ai.mit.edu>
In article <PHILG.94Aug18131743@camelot.ai.mit.edu>, philg@mit.edu wrote:
> Remember I said I wanted a function to go out to the network and grab
4the following gets the same as my unix box
(require 'mactcp)
(defun get-http-url (hostname filename)
(let ((stream (open-tcp-stream hostname 80))
result
)
(unwind-protect
(progn
(ccl::telnet-write-line stream (format nil "GET ~a HTTP/1.0" filename))
(ccl::telnet-write-line stream "")
(setq result (ccl::telnet-read-line stream)))
(close stream))
result))
#|
(get-http-url "www-swiss.ai.mit.edu" "/")
|#