mirror of
https://github.com/urbit/shrub.git
synced 2024-12-13 16:03:36 +03:00
Curl utility
This commit is contained in:
parent
db05158f71
commit
8bbe811ad1
20
main/app/curl/core.hook
Normal file
20
main/app/curl/core.hook
Normal file
@ -0,0 +1,20 @@
|
||||
:: 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)))
|
||||
--
|
Loading…
Reference in New Issue
Block a user