A few things to address:
Next, there are some dependencies between bindings. I am maintaining a github clone if you don't want to use the script
download.r
in the Red-test files with Fossil. The cURL library explicitly depends on the C-library binding. I didn't look, but like depends on the Common binding at a lower level.Because of the lack of
url!
type in Red at the moment, you pass the functionread-url
astring!
or ac-string!
more specifically.With Red/System bindings used in Red, the ideal situation is to have a wrapper that abstracts the lower level code. You can see this on TryRebol with running
read "http://www.google.com"
. Although this console build does not seem to use cURL binding for that implementation.In order to use a Red/System binding in Red, you need to use the
#system-global
directive. Here is a simple script that grabs the data from a website:Red[] #system-global [ #include %../cURL.reds with curl [ print read-url "http://www.red-lang.org" ] ]