On 6/27/05, Hallvard Ystad <[EMAIL PROTECTED]> wrote:
>=20
> If you want to save to a file something that you will later load, I think=
=3D
>  (think!) you should 'save it, not 'write it.
>=20

And to load it back, do it, not load it.
it will look like
make object! [
 ..
]
and thats code to make an object, not an object itself.
(not tested if http works then, but with ftp)

and remember to save/header, 'do checks for that with a file.
Or don't and use [do load %http.r] later.

Btw nice trick for dumping is with compose:
save/header %http.r compose/only [
  system/schemes/HTTP: (system/schemes/HTTP)
][Title: "my http"]
And then just [do %http.r]

> >> help save
> USAGE:
>     SAVE where value /header header-data /bmp /png /all
>=20
> DESCRIPTION:
>      Saves a value or a block to a file or url.
>      SAVE is a native value.
>=20
> ARGUMENTS:
>      where -- Where to save it. (Type: file url binary)
>      value -- Value to save. (Type: any)
>=20
> REFINEMENTS:
>      /header -- Save it with a header
>          header-data -- Header block or object (Type: block object)
>      /bmp -- Save in .BMP format
>      /png -- Save in .PNG format
>      /all -- Save in serialized format
>=20
>=20
> HY
>=20
> Dixit Bruno G. Albuquerque (18.23 27.06.2005):
>=20
> >To be able to set the Referer header in the HTTP request, I am trying to
> >patch the HTTP scheme. I did some preliminary tests and I am having
> >problems. Without changing anything in the scheme, I did this to save it
> >in a file:
> >
> >write %http.r probe system/schemes/HTTP
> >
> >Then, to read it back, I did:
> >
> >system/schemes/HTTP: load %http.r
> >
> >This results in a crash (under Windows) when trying to use the HTTP
> >protocol. Am I doing something wrong?
> >
> >-Bruno
> >
> >--=3D20
> >To unsubscribe from the list, just send an email to=3D20
> >lists at rebol.com with unsubscribe as the subject.
>=20
> Pr=3DE6tera censeo Carthaginem esse delendam
>=20
> --
> To unsubscribe from the list, just send an email to
> lists at rebol.com with unsubscribe as the subject.
>=20
>=20


--=20
-Volker

"Any problem in computer science can be solved with another layer of
indirection. But that usually will create another problem." David
Wheeler
-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to