从rebol或red调用curl';行不通

从rebol或red调用curl';行不通,curl,rebol,red,Curl,Rebol,Red,在dos cmd上,这是有效的: curl.exe -L https://dl.uxnr.de/build/curl/curl_winssl_msys2_mingw64_stc/curl-7.53.1/curl-7.53.1.zip > curl.zip 在red或rebol上,根据建议,我尝试了下面的代码,但不起作用。为什么 call {curl.exe -L https://dl.uxnr.de/build/curl/curl_winssl_msys2_mingw64_stc/cur

在dos cmd上,这是有效的:

curl.exe -L https://dl.uxnr.de/build/curl/curl_winssl_msys2_mingw64_stc/curl-7.53.1/curl-7.53.1.zip > curl.zip
在red或rebol上,根据建议,我尝试了下面的代码,但不起作用。为什么

call {curl.exe -L https://dl.uxnr.de/build/curl/curl_winssl_msys2_mingw64_stc/curl-7.53.1/curl-7.53.1.zip > curl.zip}
我还尝试了call/wait,它也不起作用。

Rebol2:

call/output {curl.exe -L https://www.example.com} data: make string! estimated-big-enough-number
Rebol3(Ren/C分行):

红色:


一串既然它是二进制文件:)@user310291也可以说
data:makebinary我修改了答案,使其适用于Red和Rebol2My版本的R3是2.101.0.3.1,并且“调用对/shell或/output没有任何改进”。它只支持/wait。关于如何获取从cURL返回的数据的任何提示?您可以尝试重定向,然后将其作为调用“ls-l>this-I-want”数据读取:读取%this-I-want
call/shell/output {curl -L https://www.example.com} data: make binary! 0

;; or

call/output [%/path/to/curl "-L" "https://www.example.com"] data: make binary! 0

;;or a poor mans solution as in e.g.

 call {curl -L -k https://dl.uxnr.de/build/curl/curl_winssl_msys2_mingw64_stc/curl-7.53.1/curl-7.53.1.zip  > this-I-want } data: read %this-I-want
call/output {curl -L -k https://dl.uxnr.de/build/curl/curl_winssl_msys2_mingw64_stc/curl-7.53.1/curl-7.53.1.zip} data: make binary! 100'000