Here's something I used once. Don't know where I got it from, it might very=
well be this list. Works with R2, not tested otherwise:
insert-this: {GET / HTTP/1.0
Host: www.rebol.com
connection: close
user-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
}
port: open/lines [
scheme: 'tcp
host: "www.rebol.com"
port-id: 80
]
insert port insert-this
header: make block! 100
while [
reply: first port not empty? reply ] [
parse reply [
[copy name [thru #":"] (name: load name) | copy name [to end] (append=
header reduce [name ""])]
[copy value to newline | copy value to end] (if value [append header=
reduce [name value]])
]
]
either [ not empty? content: first port ] [content: copy port] [print=
"EMPTY!"]
close port
probe header
;print reduce [content]
halt
Dixit Thorsten Moeller (17:03 07.10.2010):
>Hi all,
>
>in my app i make an http request like "read/custom url [ GET ]".
>
>How do i access the response codes to react on them?? I see them when
>tracenet is on, but was not able to find anywhere to use it.
>
>Docs weren't as helpful as i hoped. Any suggestions??
>
>Cheers=20
>
>Thorsten=20
>
>
>--=20
>http://www.fastmail.fm - One of many happy users:
> http://www.fastmail.fm/docs/quotes.html
>
>--=20
>To unsubscribe from the list, just send an email to=20
>lists at rebol.com with unsubscribe as the subject.
Pr=E6tera censeo Carthaginem esse delendam
--
To unsubscribe from the list, just send an email to
lists at rebol.com with unsubscribe as the subject.