urbit/base/app/curl/core.hook
2015-04-29 18:48:45 -04:00

21 lines
377 B
Plaintext

:: Command-line URL fetch, :curl "http://example.com"
::
::::
::
/+ sh-utils
!:
|_ [hide *]
++ peer ,_`.
++ poke--args
%+ gate-bang
|=([a=tape ~] [%e %them ~ ~|([%bad-url a] (scan a auri:epur)) %get ~ ~])
,_`.
::
++ pour
%+ args-into-gate .
|= [%e %thou @ mess a=(unit octs)]
:- %tang
?~ a ~
(turn (lore q.u.a) |=(b=cord leaf/(trip b)))
--