Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Reading HTTP headers

From: carl:cybercraft at: 13-Jan-2002 1:28

On 12-Jan-02, Harold wrote:
> Using the View/Pro package for Linux: > I want to use REBOL for submitting some pages of my website to > search engines. Supposedly I submit the query string using a "read" > of the appropriate search engine submission page. > But how can I read just the header code (such as "200 OK") of the > page that is returned? I don't want the content of the page that is > returned, just its headers.
You can get it using a TCP port and HEAD instead of GET. Here's a modified version of the example in the Core User Guide... http-port: open tcp://www.rebol.com:80 insert http-port "HEAD / HTTP/1.0^/^/" while [data: copy http-port][prin data] close http-port Along with looking through the protocol section of the User Guide, you might find these two URLs might come in handy as well, they having the specs of HTML 1.0 and 1.1... http://www.ics.uci.edu/pub/ietf/http/rfc1945.txt http://www.ietf.org/rfc/rfc2068.txt -- Carl Read