The read
and write
commands in Rebol, when passed a URL! parameter, can get you either a binary response or an error. So in the "one-off" style of doing a GET or a POST there is nowhere to get the response headers from.
result: read http://www.rebol.com
In this post about how to do it in Rebol2, it suggests you have to open a port! and get it from the port's local/headers field:
This works in Rebol2, for instance
hp: open http://www.rebol.com
result: read hp
probe hp/locals/headers/Content-Encoding
But in Rebol3, when I open a port and try this the locals field of the port is empty. How to achieve the same behavior in Rebol3?