Rebol - HTTP response headers

2019-07-22 04:05发布

Where does Rebol (R2) save the HTTP response headers after a call to the read function (which just seems to return the page content)?

1条回答
来,给爷笑一个
2楼-- · 2019-07-22 04:32

Not sure there is an easy way to get the headers after a straight read.

You can get them if you open a port:

hp: open http://www.rebol.com
probe hp/locals/headers
    make object! [
        Date: "Sat, 07 May 2011 07:08:35 GMT"
        Server: "Apache"
        Last-Modified: "Tue, 22/Feb/2011/06:52:26/+GMT"
        Accept-Ranges: "bytes"
        Content-Encoding: none
        Content-Type: "text/html"
        Content-Length: "9062"
        Location: none
        Expires: none
        Referer: none
        Connection: "close"
        Authorization: none
    ]
查看更多
登录 后发表回答