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

HTTP question.

 [1/4] from: pwoodward::cncdsl::com at: 27-Mar-2002 16:56


Hi - not sure if this has been covered before... Is there some way for REBOL to expose the response headers of the server when you make a get request from that server? I've been using trace/net to see what comes back, but I would prefer a more programmatic approach. Example: trace/net: true myURL: http://www.yahoo.com/ myData: read myURL Ideally I'd like to be able to see the headers the server responds with - like the mime type it claims, etc. Is there some easy way to access these values when reading a URL? - Porter Woodward

 [2/4] from: mike:yaunish:shaw:ca at: 27-Mar-2002 21:54


At 04:56 PM 27/03/02 -0500, you wrote: I believe that the file http://www.reboltech.com/library/html/proxy.html will show you an example as to how to get this information.

 [3/4] from: gchiu:compkarori at: 28-Mar-2002 22:29


> Example: > trace/net: true
<<quoted lines omitted: 5>>
> way to access these > values when reading a URL?
Hi Porter, You could use my http-tools stuff. do http://www.compkarori.co.nz/reb/http-tools.r test: http-tools http://www.yahoo.com [] probe test make object! [ HTTP-Response: "HTTP/1.0 200 OK" Date: "Thu, 28 Mar 2002 10:25:41 GMT" Server: none Last-Modified: none Accept-Ranges: none Content-Encoding: none Content-Type: "text/html" Content-Length: none Location: none Expires: none Referer: none Connection: "close" Set-Cookie: none Accept-Charset: none content: {<..... ] -- Graham Chiu

 [4/4] from: pwoodward:cncdsl at: 28-Mar-2002 6:56


Graham - thanks so much - that's perfect. Cookies, too! I'm just building something to help me analyze pages, and page responses. And this will make it much easier; much more like using an HTTP lib in another language - where a response object is returned, and one attribute of the object is the content, etc. - Porter Woodward

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted