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:// 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... -- Carl Read