defer initial http request from +prep
::
+= card
$% [%hiss wire [~ ~] %httr %hiss hiss:eyre]
+ [%wait wire @da]
[%well wire path (unit mime)]
[%rule wire %cert (unit [wain wain])]
==
::
:: +retry: retry effect after timeout
::
- ++ retry !!
+ ++ retry
+ |= [wir=wire wen=@da]
+ :: XX validate wire and date
+ (emit %wait [%acme wir] wen)
--
:: |event: accept event, emit next effect(s)
::
:: +retry: retry effect after timeout
::
++ retry
- :: XX implement wire parsing / next effect
- !!
+ |= wir=wire
+ ^+ this
+ ?+ wir
+ ~&(unknown-retry+wir this)
+ :: XX do the needful
+ [%directory ~] directory:effect
+ ==
--
:: +sigh-tang: handle http request failure
::
%finalize-trial finalize-trial:event
:: XX delete-trial?
==
+:: +wake: timer wakeup event
+::
+++ wake
+ |= [wir=wire ~]
+ ^- (quip move _this)
+ ~& [%wake wir]
+ ?> ?=([%acme *] wir)
+ abet:(retry:event t.wir)
:: +poke-acme-order: create new order for a set of domains
::
++ poke-acme-order
++ init
=/ url
'https://acme-staging-v02.api.letsencrypt.org/directory'
- =< directory:effect
+ =< (retry:effect /directory +(now.bow))
%= this
bas (need (de-purl:html url))
act [(rekey eny.bow) ~]
