本文介绍了从rebol调用curl或红色不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在dos cmd上有效:
On dos cmd this works:
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
根据建议,在红色或Rebol上无法读取二进制文件http 中带有红色的文件,我尝试了下面的代码,但是为什么不起作用?
On red or rebol, following suggestion Cannot read a binary file with red from http, I tried code below but it doesn't work why ?
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}
我也尝试了呼叫/等待,这也不起作用.
I also tried call/wait, it doesn't work either.
推荐答案
Rebol2:
call/output {curl.exe -L https://www.example.com} data: make string! estimated-big-enough-number
Rebol3(Ren/C分支):
Rebol3 (Ren/C branch):
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
这篇关于从rebol调用curl或红色不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!