Using R3, I need to get a localized version of the page from a website using cookies to process this. In REBOL 2.x, I could do this:
page: http://www.rci.com/resort-directory/resortDetails?resortCode=0450 read/custom page [header [Cookie: "USER_LOCALE=fr_FR"]]
Based on sketchy docs for R3, I should do something like:
result: write page [GET [Cookie: "USER_LOCALE"] {fr_FR}]
Does anyone have any ideas? The R2 method worked well, but since R2 does not handle UTF-8, which is necessary for many foreign languages, it doesn’t work for me.
** Update **
Solution (recounted) in R2 for my example:
Collect the necessary parameters in a cookie:
cookie-str: "USER_LOCALE=fr_FR; USER_COUNTRY=US"
Then paste the cookie in the header
page-code: read/custom page reduce compose/deep ['header [Cookie: (cookie-str)]]
Solution for my example in R3:
page-code: to-string write page reduce compose/deep ['GET [Cookie: (cookie-str)]]
source share