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

[REBOL] Re: HTTP header request

From: sterling:rebol at: 7-Jun-2001 18:53

The POST capability works as you comment at the end: read/custom http://site.com/cgi-bin/script.r [post "my post data"] You ahve to form the post data yourself right now and using that method you can only safely post data that is x-www-form-urlencoded which is the same format of a GET request "var=value&var2=value2" because the urlencoded header is sent by REBOL. Of course, if you're posting to your own REBOL script or one that doesn't check that header, you can post whatever you like. Adding to this dialect, yo uwill be able to say: [header [user-agent: "My user-agent field" content-type: "application/x-my-app"]] and the sent HTTP header will include fields like this: Accept: */* user-agent: "My user-agent field" content-type: "application/x-my-app" Host: site-you-connected-to.com You can use both the header and post requests together if you like. Reading a part of a web page is currently possible using read/skip. If the server supports partial downloads, you'll get it. Turn trace/net on and do a read like that to see the headers. Read/skip also works with FTP to support resumed downloads there also. Sterling