in :dns-bind, send http responses on request bone
loop(dep t.dep)
::
%handle-http-request
+ :: always stash request bone for giving response
+ ::
+ =/ =bone ost.bowl
:: XX maybe always (set-raw-contract %request) so transaction failure is captured?
::
=* inbound-request inbound-request.in-poke-data
=> inbound-request
[authenticated secure address [method url]:request]
==
- ;< ~ bind:m (send-effect:stdio [%http-response %start [%403 ~] ~ %.y])
+ ;< ~ bind:m
+ (send-effect-on-bone:stdio bone [%http-response %start [%403 ~] ~ %.y])
(pure:m state)
::
=* nam u.nem.state
=* params q.u.parsed
::
?+ url
- ;< ~ bind:m (send-effect:stdio [%http-response %start [%404 ~] ~ %.y])
+ ;< ~ bind:m
+ (send-effect-on-bone:stdio bone [%http-response %start [%404 ~] ~ %.y])
(pure:m state)
::
[%dns %oauth ~]
;a(href link): {link}
==
==
- ;< ~ bind:m (send-effect:stdio [%http-response %start [%200 ~] bod %.y])
+ ;< ~ bind:m
+ (send-effect-on-bone:stdio bone [%http-response %start [%200 ~] bod %.y])
(pure:m state)
::
[%dns %oauth %result ~]
::
:: XX may need to send this as a card so we don't wait
::
- ;< ~ bind:m (send-effect:stdio [%http-response %start [%301 hed] ~ %.y])
+ ;< ~ bind:m
+ (send-effect-on-bone:stdio bone [%http-response %start [%301 hed] ~ %.y])
(initialize-authority aut.nam state)
::
[%dns %oauth %success ~]
